now() created
This commit is contained in:
parent
71e5b4003c
commit
2947cf0ec4
12
src/utils.c
12
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
|
* 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)
|
long today(void)
|
||||||
{
|
{
|
||||||
struct tm *lt;
|
struct tm *lt;
|
||||||
@ -631,3 +632,12 @@ long today(void)
|
|||||||
|
|
||||||
return current_day;
|
return current_day;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Returns the current time in seconds. */
|
||||||
|
long now(void)
|
||||||
|
{
|
||||||
|
time_t current_time;
|
||||||
|
|
||||||
|
current_time = time(NULL);
|
||||||
|
return current_time;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user