2018-05-28 10:10:41 +02:00
|
|
|
/*
|
|
|
|
* This software is licensed under the terms of the MIT-License
|
|
|
|
* See COPYING for further information.
|
|
|
|
* ---
|
2019-01-23 21:10:43 +01:00
|
|
|
* Copyright (c) 2011-2019, Lukas Weber <laochailan@web.de>.
|
|
|
|
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@alienslab.net>.
|
2018-05-28 10:10:41 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "taisei.h"
|
|
|
|
|
|
|
|
#include "assert.h"
|
|
|
|
#include "stringops.h"
|
|
|
|
|
|
|
|
void get_system_time(SystemTime *systime) {
|
|
|
|
#if defined(TAISEI_BUILDCONF_HAVE_TIMESPEC)
|
|
|
|
timespec_get(systime, TIME_UTC);
|
|
|
|
#else
|
|
|
|
systime->tv_sec = time(NULL);
|
|
|
|
systime->tv_nsec = 0;
|
|
|
|
#endif
|
|
|
|
}
|