You can use CLOCK_MONOTONIC e.g. in C:
struct timespec ts;
if(clock_gettime(CLOCK_MONOTONIC,&ts) != 0) {
//error
}
See this question for a Python way – How do I get monotonic time durations in python?
More Related Contents:
- Can we use C code in Python?
- Why does multiprocessing use only a single core after I import numpy?
- How to wait some time in pygame?
- What is the internal precision of numpy.float128?
- How do I check the difference, in seconds, between two dates?
- Wrapping a C library in Python: C, Cython or ctypes?
- How to run a function periodically in python
- Python speed testing – Time Difference – milliseconds
- How do I change the file creation date of a Windows file?
- Python multiprocessing: Permission denied
- In python, how to capture the stdout from a c++ shared library to a variable
- Simulating Key Press event using Python for Linux
- How to store the result of an executed shell command in a variable in python? [duplicate]
- What files are required for Py_Initialize to run?
- In python, how to check if a date is valid?
- How can I parse free-text time intervals in Python, ranging from years to seconds?
- Why allow concatenation of string literals?
- gunicorn command not found, but it’s in my requirements.txt
- Fetching the output of a command executed through os.system() command [duplicate]
- How to add hours to current time in python
- Python [Errno 98] Address already in use
- Pyaudio installation error – ‘command ‘gcc’ failed with exit status 1′
- Get mouse deltas using Python! (in Linux)
- Embedding Python in C, linking fails with undefined reference to `Py_Initialize’
- Writing code translator from Python to C? [closed]
- Installing lxml for Python 3.4 on Windows x 86 (32 bit) with Visual Studio C++ 2010 Express
- Move and zoom a tkinter canvas with mouse
- Python multiprocessing linux windows difference
- Extending python – to swig, not to swig or Cython
- Call python code from c via cython