Questions tagged [time-measurement]
59 questions
1
vote
2 answers
C++ Time measurement of functions
I need to measure the time of a C++ programs, especially the overall running time of some recursive functions. There are a lot of function calls inside other functions. My first thought was to implement some time measurements functions in the actual…

Biler
- 41
- 1
- 1
- 6
1
vote
1 answer
System.currentTimeMillis() returns 0 (zero)
I am currently trying to make a little game for Android.
I try to measure the time between two actions of the game but the begin time stays 0 when I try to call the currentTimeMillis() method after I called the gameThread.run() method (gameThread is…

Refrigerator
- 147
- 2
- 8
0
votes
1 answer
How to calculate process memory without shared libs in *nix?
I've simple program e.g. in C++
#include
int main()
{
int a = 1000;
std::cout << a << std::endl;
return 0;
}
and i'm trying to calculate memory usage with GNU time. But in "time" output (with my format, it…

Ribtoks
- 6,634
- 1
- 25
- 37
0
votes
1 answer
Measuring system time of specific agent in anylogic
I've got 3 different product types of agent, which each go it's individual path within the fabric. How can i measure the average time the product type spends in the system?
My logic looks like this , and i wanted to implement the measurement in the…

TimFabregas
- 17
- 2
0
votes
1 answer
Putting Time Measurement in agent parameters
In my model I use time measurements to calculate the waiting time of an order (see figure 1). Now I want to add the value of this waiting time for a specific agent in the agent parameter waiting time, but I've no clue how to exactly do that, what…

Aron T.
- 448
- 2
- 7
0
votes
1 answer
I want to print time if the value is repeated more then 10 second
The code below will start to print the time if:
time.time() - start_time) >10 and Total_ratio > 5.0
but its only works once. How to make it work for every 10 seconds because its works only once.
end_time = time.time() + 5
if ((time.time() -…

Toby Ran
- 1
0
votes
1 answer
Time Measurement Unit in CPLEX
In IBM ILOG CPLEX model I use "MyCplex.getCplexTime()" for measuring the time but it gives output as "time:2338551.031". I couldn`t figure out the unit of it. Is there any code to get time in seconds?

BBiskin
- 3
- 2
0
votes
1 answer
making time measurement for class methodes
I have written class for measure function run time. and its works fine. However when I start to use it in my project to measure speed of classes method, it breaks with the following error:
error: invalid use of non-static member function
this is…

brfh
- 334
- 1
- 12
0
votes
0 answers
Force return if elapsedtime > value
I need something in python that forces a method to exit if it couldn't finish its task completely.
Imagine you have a pipeline (several steps) and I need to allow that pipeline to execute at most an hour.
If it succeeded to finish its job, then…

N0rA
- 612
- 1
- 7
- 27
0
votes
1 answer
Fixed time error between two continuous time points
The following codes periodically sleep to expected time point(ts), and get the system time(tm2) immediately. Why is there a fixed time error (~52us) between ts and tm2, since two time points adjoin.
The running environment is a realtime-patched…

foool
- 1,462
- 1
- 15
- 29
0
votes
1 answer
Performance.now() in a multi threaded context
I need to use web workers for a demanding computation. I have const t0 = performance.now() and const t1 = performance.now() respectively at the beginning and the end of my code. I want to report t1 - t0 as the time required to perform the…

rucquoy
- 5
- 2
0
votes
1 answer
Linux measuring time problem! std::chrono, QueryPerformanceCounter, clock_gettime
I use clock_gettime() in Linux and QueryPerformanceCounter() in Windows to measure time. When measuring time, I encountered an interesting case.
Firstly, I'm calculating DeltaTime in infinite while loop. This loop calls some update functions. To…

tgrlsrt
- 3
- 3
0
votes
1 answer
SQW signal on DS3231 RTC module is stuck at 1Hz (need 1024Hz)
I want to use a DS3231 RTC (ZS-042) to make precise time measurements on my arduino uno. I need to measure milliseconds, to the regular time functions of the various RTC libs are not enought.
After googling & asking aroung I found that I need to use…

user826955
- 3,137
- 2
- 30
- 71
0
votes
1 answer
Measuring time in a virtualized environment
I developed a series of microbenchmarks using some shared-memory libraries (e.g. openmp, tbb, etc) to check how they scale varying the number of threads.
Currently I'm running them on a 4-core processor, the results are pretty reasonable, but I…

Kyle
- 87
- 6
0
votes
2 answers
What is the most efficient, "cheap" and accurate way to measure time in Java in resolution of microseconds?
I'm using ASM java byte code instrumentation and my goal is to measure the time in each access to a variable.
** measure time and log **
** variable access **
I'm looking for a resolution of microseconds. It should be accurate and therefore…

RanZilber
- 1,840
- 4
- 31
- 42