gbdk/gbdk-lib/include/time.h

29 lines
561 B
C
Raw Permalink Normal View History

2015-01-10 16:25:06 +01:00
/** @file time.h
Sort of ANSI compliant time functions.
*/
#ifndef TIME_INCLUDE
#define TIME_INCLUDE
#include <types.h>
2015-01-10 16:25:07 +01:00
#if SDCC_PLAT==consolez80
#define CLOCKS_PER_SEC 100
#else
2015-01-10 16:25:06 +01:00
/** For now... */
2015-01-10 16:25:07 +01:00
#error
2015-01-10 16:25:06 +01:00
#define CLOCKS_PER_SEC 50
2015-01-10 16:25:07 +01:00
#endif
2015-01-10 16:25:06 +01:00
2015-01-10 16:25:07 +01:00
typedef UINT16 time_t;
2015-01-10 16:25:06 +01:00
/** The clock() function returns an approximation of processor time
used by the program. The value returned is the CPU time used so far
as a clock_t; to get the number of seconds used, divide by
CLOCKS_PER_SEC.
*/
2015-01-10 16:25:08 +01:00
clock_t clock(void) NONBANKED;
2015-01-10 16:25:06 +01:00
2015-01-10 16:25:09 +01:00
time_t time(time_t *t);
2015-01-10 16:25:07 +01:00
2015-01-10 16:25:06 +01:00
#endif