Time output

This commit is contained in:
James Booth
2012-02-09 00:48:17 +00:00
parent f48d22150d
commit f020ec9c82
5 changed files with 51 additions and 28 deletions

13
util.c Normal file
View File

@@ -0,0 +1,13 @@
#include <time.h>
void get_time(char *thetime)
{
time_t rawtime;
struct tm *timeinfo;
time(&rawtime);
timeinfo = localtime(&rawtime);
strftime(thetime, 80, "%H:%M", timeinfo);
}