Sigrid Solveig Haflínudóttirrename to shortendf55d101 year agoHistory
57 lines · 750 B · C
RawDownload
#include "sl.h"#include "timefuncs.h" doublesec_realtime(void){	return 0.0;} u64intnanosec_monotonic(void){	return 0;} voidtimestr(double s, char *buf, int sz){	time_t tme = (time_t)s;	struct tm tm; 	*buf = 0;	if(localtime_r(&tme, &tm) != nil)		strftime(buf, sz, "%a %b %e %H:%M:%S %Y", &tm);} doubleparsetime(const char *s){	return -1;} voidsleep_ms(int ms){	if(ms != 0){		struct timeval timeout;		timeout.tv_sec = ms/1000;		timeout.tv_usec = (ms % 1000) * 1000;		select(0, nil, nil, nil, &timeout);	}} voidsys_init(void){} static const u8int boot[] = {#include "sl.boot.h"}; intmain(int argc, char **argv){	setlocale(LC_NUMERIC, "C");	setlocale(LC_CTYPE, "");	slmain(boot, sizeof(boot), argc, argv);}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t