Update src/time.c
This commit is contained in:
+24
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user