grandma icon indicating copy to clipboard operation
grandma copied to clipboard

support for timestamps and relative timers

Open catdad opened this issue 7 years ago • 1 comments

Currently, you have to start and end a timer with the same name. This is a problem if you want to time several events from the start of the test (or from some milestone), but you do not know necessarily know how many events you will be timing or what their names will be. I would like an API that can create a timestamp (or milestone) and be able to record named timer values from that milestone rather than from the start of a timer with the same name.

Example:

this.timestamp('milestone name');
...
this.end('timer name', 'milestone name');

Note: it might need to use a specific new function name for this method, so as to not need to execute extra logic to determine whether it is ending a named timer or if it is relative to a timestamp... since timers can be very sensitive.

catdad avatar May 26 '17 21:05 catdad

It might be better to implement this directly in hitime.

catdad avatar May 26 '17 21:05 catdad