2 * Copyright 2009, Axel Dörfler, axeld@pinc-software.de.
3 * Copyright 2007, Ingo Weinhold, bonefish@cs.tu-berlin.de.
5 * Distributed under the terms of the MIT License.
8 #include "compatibility.h"
11 #include "fssh_time.h"
19 // #pragma mark - OS.h
24 fssh_set_real_time_clock(unsigned long secs_since_jan1_1970
)
30 fssh_set_timezone(char *timezone
)
37 fssh_real_time_clock(void)
40 gettimeofday(&tv
, NULL
);
47 fssh_real_time_clock_usecs(void)
50 gettimeofday(&tv
, NULL
);
52 return tv
.tv_sec
* 1000000LL + tv
.tv_usec
;
57 fssh_system_time(void)
63 // #pragma mark - time.h
67 fssh_time(fssh_time_t
*timer
)
69 time_t result
= time(NULL
);