Continous integration / Tests (push) Canceled after 0s
Testing clients / Build beanstalkd (push) Canceled after 0s
Continous integration / Docker build (push) Canceled after 0s
Testing clients / Test Pheanstalk PHP (push) Canceled after 0s
Testing clients / Test Greenstalk Python (3.9) (push) Canceled after 0s
Testing clients / Test Pystalk Python (3.10) (push) Canceled after 0s
17 lines
309 B
C
17 lines
309 B
C
#include "dat.h"
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
#include <sys/time.h>
|
|
|
|
int64
|
|
nanoseconds(void)
|
|
{
|
|
int r;
|
|
struct timeval tv;
|
|
|
|
r = gettimeofday(&tv, 0);
|
|
if (r != 0) return warnx("gettimeofday"), -1; // can't happen
|
|
|
|
return ((int64)tv.tv_sec)*1000000000 + ((int64)tv.tv_usec)*1000;
|
|
}
|