From 2947cf0ec4203b2d49a8b661a83ec7f5a21aecb7 Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Sat, 16 Sep 2006 09:09:39 +0000 Subject: now() created --- src/utils.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/utils.c b/src/utils.c index 9d795dc..3589563 100755 --- a/src/utils.c +++ b/src/utils.c @@ -1,4 +1,4 @@ -/* $calcurse: utils.c,v 1.7 2006/09/14 14:53:16 culot Exp $ */ +/* $calcurse: utils.c,v 1.8 2006/09/16 09:09:39 culot Exp $ */ /* * Calcurse - text-based organizer @@ -615,6 +615,7 @@ void other_status_page(int panel) } } +/* Returns the beginning of current day in seconds from 1900. */ long today(void) { struct tm *lt; @@ -631,3 +632,12 @@ long today(void) return current_day; } + +/* Returns the current time in seconds. */ +long now(void) +{ + time_t current_time; + + current_time = time(NULL); + return current_time; +} -- cgit v1.2.3-70-g09d2