K
Kevin
Hello:
I am trying to find documentation on using the ctime library as I need
to be able to instantiate an object to keep track of the time when a
certain event occurs. I also need to be able to take two of those
objects and perform calculations on them like: the time difference,
summing them, getting the mean time between events, etc.
Is ctime what I should be using?
Is there a better way?
Is there an clock or counter object that would act as a stopwatch and
continually run from instantiation while other code is executing?
I am trying to write a simulation program for a class project and I
have to calculate the time between events, but I am not sure how to go
about using some kind of timing object.
If you have any suggestions, I would appreciate them. I am not asking
anyone to write the program for me, just give me some direction as to
help me avoid mistakes and inefficient coding.
Thank you in advance.
Kevin
I am trying to find documentation on using the ctime library as I need
to be able to instantiate an object to keep track of the time when a
certain event occurs. I also need to be able to take two of those
objects and perform calculations on them like: the time difference,
summing them, getting the mean time between events, etc.
Is ctime what I should be using?
Is there a better way?
Is there an clock or counter object that would act as a stopwatch and
continually run from instantiation while other code is executing?
I am trying to write a simulation program for a class project and I
have to calculate the time between events, but I am not sure how to go
about using some kind of timing object.
If you have any suggestions, I would appreciate them. I am not asking
anyone to write the program for me, just give me some direction as to
help me avoid mistakes and inefficient coding.
Thank you in advance.
Kevin