Jetson Inference
DNN Vision Library
timespec.h File Reference
#include <time.h>
#include <stdint.h>
#include <stdio.h>

Go to the source code of this file.

Functions

void timestamp (timespec *timestampOut)
 Retrieve a timestamp of the current system time. More...
 
timespec timestamp ()
 Retrieve a timestamp of the current system time. More...
 
timespec timeZero ()
 Return a blank timespec that's been zero'd. More...
 
timespec timeNew (time_t seconds, long int nanoseconds)
 Return an initialized timespec More...
 
timespec timeNew (long int nanoseconds)
 Return an initialized timespec More...
 
timespec timeAdd (const timespec &a, const timespec &b)
 Add two times together. More...
 
void timeDiff (const timespec &start, const timespec &end, timespec *result)
 Find the difference between two timestamps. More...
 
timespec timeDiff (const timespec &start, const timespec &end)
 Find the difference between two timestamps. More...
 
int timeCmp (const timespec &a, const timespec &b)
 Compare two timestamps. More...
 
float timeFloat (const timespec &a)
 Convert to 32-bit float (in milliseconds). More...
 
float timeDouble (const timespec &a)
 Convert to 64-bit double (in milliseconds). More...
 
char * timeStr (const timespec &timestamp, char *strOut)
 Produce a text representation of the timestamp. More...
 
void timePrint (const timespec &timestamp, const char *text=NULL)
 Print the time to stdout. More...
 
void sleepTime (const timespec &duration)
 Put the current thread to sleep for a specified time. More...
 
void sleepTime (time_t seconds, long int nanoseconds)
 Put the current thread to sleep for a specified time. More...
 
void sleepMs (uint64_t milliseconds)
 Put the current thread to sleep for a specified number of milliseconds. More...
 
void sleepUs (uint64_t microseconds)
 Put the current thread to sleep for a specified number of microseconds. More...
 
void sleepNs (uint64_t nanoseconds)
 Put the current thread to sleep for a specified number of nanoseconds. More...