PLplot
5.15.0
Loading...
Searching...
No Matches
wxPLplot_nanosec.cpp
Go to the documentation of this file.
1
#include "
wxPLplot_nanosec.h
"
2
#if defined ( PLPLOT_WX_DEBUG_OUTPUT ) && defined ( PLPLOT_WX_NANOSEC )
3
4
#include <stdint.h>
// for uint64 definition
5
#include <time.h>
// for clock_gettime
6
#define BILLION 1000000000L
7
8
void
9
pl_wx_nanosec(
const
char
*
string
)
10
{
11
uint64_t timestamp;
12
struct
timespec timenano;
13
// Determine seconds since the epoch and nanosecs since the epoch of
14
// the last second.
15
clock_gettime( CLOCK_MONOTONIC, &timenano );
16
timestamp = BILLION * ( timenano.tv_sec ) + timenano.tv_nsec;
17
wxLogDebug(
"nanosecs since epoch = %llu: %s"
, (
long
long
unsigned
int
) timestamp,
string
);
18
}
19
#endif
//#if defined(PLPLOT_WX_DEBUG_OUTPUT) && defined(PLPLOT_WX_NANOSEC)
wxPLplot_nanosec.h
bindings
wxwidgets
wxPLplot_nanosec.cpp
Generated on Tue Apr 29 2025 00:00:00 for PLplot by
1.13.2