aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2006-09-16 09:09:39 +0000
committerFrederic Culot <calcurse@culot.org>2006-09-16 09:09:39 +0000
commit2947cf0ec4203b2d49a8b661a83ec7f5a21aecb7 (patch)
treedce00a03ad344afdfaa7cbf66b745ba10c5c113e /src
parent71e5b4003cda592d8d0079d5227dddaccbc7c8fc (diff)
downloadcalcurse-2947cf0ec4203b2d49a8b661a83ec7f5a21aecb7.tar.gz
calcurse-2947cf0ec4203b2d49a8b661a83ec7f5a21aecb7.zip
now() created
Diffstat (limited to 'src')
-rwxr-xr-xsrc/utils.c12
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;
+}