6#include "dawn/io/systime.hxx"
28 ret = clock_gettime(CLOCK_REALTIME, &ts);
36 uint64_t *time_data =
static_cast<uint64_t *
>(data.
getDataPtr());
37 *time_data =
static_cast<uint64_t
>(ts.tv_sec) * 1000000000ULL +
static_cast<uint64_t
>(ts.tv_nsec);
49 uint64_t *time_data =
static_cast<uint64_t *
>(data.
getDataPtr());
50 ts.tv_sec =
static_cast<time_t
>(*time_data / 1000000000ULL);
51 ts.tv_nsec =
static_cast<long>(*time_data % 1000000000ULL);
53 ret = clock_settime(CLOCK_REALTIME, &ts);
64 return sizeof(uint64_t);
bool isWrite() const
Check if IO supports write operations.
size_t getDataDim() const
Get data vector dimension.
int setDataImpl(IODataCmn &data)
Set data implementation (override in derived classes).
bool isNotify() const
Check if IO supports notifications.
size_t getDataSize() const
Get data size in bytes.
int getDataImpl(IODataCmn &data, size_t len)
Get data implementation (override in derived classes).
bool isRead() const
Check if IO supports read operations.
int init()
One-time initialize object after bindings are resolved.
bool isBatch() const
Check if IO supports batch operations.
Out-of-tree user-extension hooks for Dawn.
Base interface for I/O data buffers (static and dynamic).
virtual void * getDataPtr(size_t batch=0)=0
Get pointer to data only (skips timestamp if present).