diff options
author | Frederic Culot <calcurse@culot.org> | 2006-09-16 09:09:39 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2006-09-16 09:09:39 +0000 |
commit | 2947cf0ec4203b2d49a8b661a83ec7f5a21aecb7 (patch) | |
tree | dce00a03ad344afdfaa7cbf66b745ba10c5c113e /src | |
parent | 71e5b4003cda592d8d0079d5227dddaccbc7c8fc (diff) | |
download | calcurse-2947cf0ec4203b2d49a8b661a83ec7f5a21aecb7.zip |
now() created
Diffstat (limited to 'src')
-rwxr-xr-x | src/utils.c | 12 |
1 files changed, 11 insertions, 1 deletions
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; +} |