gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
gbdk-lib/libc/time.c
1 /*
2 time.c
3 Simple, not completely conformant implementation of time routines
4 */
5
6 #include <stdint.h>
7
8 /* clock() is in clock.s */
9 #include <time.h>
10
11 time_t time(time_t *t) {
12 uint16_t ret;
13 /* Should be relative to 0:00 1970 GMT but hey */
14 ret = clock() / CLOCKS_PER_SEC;
15 if (t) *t = ret;
16 return ret;
17 }
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.