sc/time/README.md

24 lines
313 B
Markdown
Raw Permalink Normal View History

2021-02-07 22:31:04 +03:00
### Time functions
2021-02-03 08:09:50 +03:00
2021-02-07 22:31:04 +03:00
### Overview
2021-02-03 08:09:50 +03:00
2021-02-06 10:19:31 +03:00
- Time and sleep functions for Posix and Windows
2021-02-03 08:09:50 +03:00
2021-02-07 22:31:04 +03:00
### Usage
2021-02-03 08:09:50 +03:00
```c
#include "sc_time.h"
#include <stdio.h>
int main(int argc, char *argv[])
{
uint64_t t = sc_time_ms();
sc_time_sleep(1000);
printf("%lu \n", (unsigned long) (sc_time_ms() - t));
return 0;
}
```