Questions tagged [high-resolution-clock]

24 questions
1
vote
1 answer

high resolution timing in kernel?

I'm writing a kernel module that requires function called in 0.1ms intervals measured with at least 0.01ms precision. 250MHz ARM CPU, the HZ variable (jiffies per second) is 100 so anything jiffies-based is a no-go unless I can increase jiffies…
SF.
  • 13,549
  • 14
  • 71
  • 107
1
vote
3 answers

Is picosecond timer possible?

Given I want to make a device, that measures distance, based on the time electromagnetic wave passes from one point (computer\microcontroller) to other. I do not consider phase shift method for that. I want centimeter precision (at least). For that…
1
vote
1 answer

Raspberry PI benchmark timings oddities with std::chrono::steady_clock

I'm trying to benchmark a piece of DSP code on a Raspberry Pi 4 using the std::chrono::steady_clock, but the results I'm getting are peculiar. Because GNU profiling tools don't work on Raspberry Pi, I'm stuck with benchmarking to evaluate code…
Robin Davies
  • 7,547
  • 1
  • 35
  • 50
1
vote
1 answer

Custom date and time including nanoseconds

For this program I need to "grab the start time of the entire process within the max. time precision avail including nanoseconds." in the format: April 9, 2022 13:18:17.123456789 I am able to get everything but the nanoseconds. Is it possible…
1
vote
0 answers

How to measure duration in very fine resolution?

I want to measure the duration of an operation the following way: t1 = GetCurrentTime() // do the operation t2 = GetCurrentTime() return TransformToSeconds(t2 - t1) How to do that in C++11? I want the measurement be as fast as possible, i.e.…
Dr. Gut
  • 2,053
  • 7
  • 26
1
vote
3 answers

Using ANSI-C on Windows platform can I get time of system upto milliseconds accuracy?

I need to get the millisecond accuracy. I take a look on this question but I am working on Windows: it gives linking errors for POSIX functions. It will be very good if I can get UTC time since 1970 with milliseconds precision.
Badr
  • 10,384
  • 15
  • 70
  • 104
0
votes
2 answers

how to find the resolution of setitimer()?

I needed a high resolution timer (at least having micro-second level resolution) and i found setitimer() can be set in micro-seconds level. struct itimerval t; t.it_interval.tv_sec = 0; t.it_interval.tv_usec = 2; t.it_value.tv_sec =…
DarRay
  • 2,550
  • 6
  • 27
  • 39
0
votes
0 answers

How do I know if my CPU support high resolution timers?

As part of the linux kernel course we are explained that high resolution timers or may may not be supported by the hardware. The hardware that affects this support is only the CPU. So I took my time and opened one of the intel CPUs specs I am trying…
Aviv
  • 414
  • 4
  • 16
-1
votes
1 answer

What is the most accurate/granular Python3 timestamp?

What is the most accurate timestamp in Python3? Associated question: would it make sense to write a little timestamp program in C and invoke it from Python, or perhaps use C++'s std::chrono::high_resolution_clock? Thx, Keith :^)
kmiklas
  • 13,085
  • 22
  • 67
  • 103
1
2