Update src/time.c

This commit is contained in:
2026-08-11 21:07:24 +00:00
parent eb17c19a60
commit e56b2da0a6
+24
View File
@@ -0,0 +1,24 @@
// this code is licenced under Wrathmark licence
// © 2026 wullie wulliestudio.com
// please see attached licence for full usage and rights
#include "stdWullie/time.h"
#include "LocalHeader.h"
// #you out of touch, im out of time when youre not a round#
// # Schlaft mine Kindlein, schlaft doch ein, der Rabe hat nach der gerufen #
void sleeper(long seconds){
timespec duration = {0};
duration.tv_sec = seconds;
syscall2(SYS_sleep, (long)(&duration), 0);
}
int unixTime(){
timespec seconds = {0};
syscall2(SYS_getTime, 0, (long)(&seconds));
return seconds.tv_sec;
}