2
0
mirror of https://github.com/status-im/status-go.git synced 2025-01-11 23:25:29 +00:00

16 lines
237 B
C
Raw Normal View History

2024-03-07 19:42:38 +08:00
#include "time32.h"
#include <time.h>
#include <errno.h>
#include <stdint.h>
time32_t __time32(time32_t *p)
{
time_t t = time(0);
if (t < INT32_MIN || t > INT32_MAX) {
errno = EOVERFLOW;
return -1;
}
if (p) *p = t;
return t;
}