From 802be13e742d087a944ab7d4fe823fb737bb1de4 Mon Sep 17 00:00:00 2001 From: David Rebbe Date: Tue, 3 Dec 2024 18:11:44 -0500 Subject: [PATCH] add timestamp resolution to example. --- examples/c/simple/src/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/c/simple/src/main.c b/examples/c/simple/src/main.c index 833f84d..9726a05 100644 --- a/examples/c/simple/src/main.c +++ b/examples/c/simple/src/main.c @@ -69,6 +69,13 @@ int main(int argc, char* argv[]) { if (res != icsneo_error_success) { return print_error_code("Failed to get device description", res); }; + // Get timestamp resolution of the device + uint32_t timestamp_resolution = 0; + res = icsneo_get_timestamp_resolution(device, ×tamp_resolution); + if (res != icsneo_error_success) { + return print_error_code("Failed to get timestamp resolution", res); + } + printf("%s timestamp resolution: %uns\n", description, timestamp_resolution); icsneo_open_options_t options = icsneo_open_options_none; res = icsneo_get_open_options(device, &options);