Rizin
unix-like reverse engineering framework and cli tools
posix-hrtime.c File Reference
#include "uv.h"
#include "internal.h"
#include <stdint.h>
#include <time.h>

Go to the source code of this file.

Macros

#define NANOSEC   ((uint64_t) 1e9)
 

Functions

uint64_t uv__hrtime (uv_clocktype_t type)
 

Macro Definition Documentation

◆ NANOSEC

#define NANOSEC   ((uint64_t) 1e9)

Definition at line 29 of file posix-hrtime.c.

Function Documentation

◆ uv__hrtime()

uint64_t uv__hrtime ( uv_clocktype_t  type)

Definition at line 31 of file posix-hrtime.c.

31  {
32  struct timespec ts;
33  clock_gettime(CLOCK_MONOTONIC, &ts);
34  return (((uint64_t) ts.tv_sec) * NANOSEC + ts.tv_nsec);
35 }
#define NANOSEC
Definition: posix-hrtime.c:29
unsigned long uint64_t
Definition: sftypes.h:28

References NANOSEC, timespec::tv_nsec, and timespec::tv_sec.