Single header file for nano time function in C. Base from the Go time package.
Copy nanotime.h
into your project source code.
#define NANOTIME_IMPLEMENTATION
#include "nanotime.h"
Currenlty nanotime.h
uses nt_
as the prefix. If you would like to use
something different, simple do a search and replace for nt_
.
Use nanotime_
as prefix. Time struct will be nanotime_Time
.
sed -i -e 's/nt_/nanotime_/g' nanotime.h
Use time_
as prefix. Time struct will be time_Time
. Similar to the Go
package.
sed -i -e 's/nt_/time_/g' nanotime.h
Or just use no prefix. Time struct will be just Time
.
sed -i -e 's/nt_//g' nanotime.h