Oolite
Loading...
Searching...
No Matches
OOProfilingStopwatch Class Reference

#include <OOProfilingStopwatch.h>

Inheritance diagram for OOProfilingStopwatch:
Collaboration diagram for OOProfilingStopwatch:

Instance Methods

(void) - start
(void) - stop
(OOTimeDelta) - currentTime
(OOTimeDelta) - reset
(id) - init [implementation]
(void) - dealloc [implementation]

Class Methods

(instancetype) + stopwatch

Private Attributes

OOHighResTimeValue _start
OOHighResTimeValue _end
BOOL _running

Detailed Description

Definition at line 147 of file OOProfilingStopwatch.h.

Method Documentation

◆ currentTime

- (OOTimeDelta) currentTime

Definition at line 74 of file OOProfilingStopwatch.m.

75{
76 if (_running) {
80 }
82}
OOTimeDelta OOHighResTimeDeltaInSeconds(OOHighResTimeValue startTime, OOHighResTimeValue endTime)
uint64_t OOHighResTimeValue
#define OOGetHighResTime
#define OODisposeHighResTime(time)
OOHighResTimeValue _start

References _end, _running, _start, currentTime, OODisposeHighResTime, OOGetHighResTime, and OOHighResTimeDeltaInSeconds().

Referenced by currentTime.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dealloc

- (void) dealloc
implementation

Definition at line 50 of file OOProfilingStopwatch.m.

51{
54
55 [super dealloc];
56}

References _end, _start, dealloc, and OODisposeHighResTime.

Referenced by dealloc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init

- (id) init
implementation

Definition at line 35 of file OOProfilingStopwatch.m.

36{
37 if ((self = [super init])) {
40 _running = YES;
41 }
42 return self;
43}
#define OOCopyHighResTime(time)

References _end, _running, _start, init, OOCopyHighResTime, and OOGetHighResTime.

Referenced by init.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset

- (OOTimeDelta) reset

Definition at line 84 of file OOProfilingStopwatch.m.

85{
86 OOTimeDelta result;
87 if (_running) {
91 _start = now;
92 } else {
96 }
97 return result;
98}
double OOTimeDelta
Definition OOTypes.h:193

References _end, _running, _start, OOCopyHighResTime, OODisposeHighResTime, OOGetHighResTime, OOHighResTimeDeltaInSeconds(), and reset.

Referenced by reset, OOCacheManager(Private)::write, and OOCacheManager(Private)::writeDict:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start

- (void) start

Definition at line 58 of file OOProfilingStopwatch.m.

59{
63 _running = YES;
64}

References _running, _start, OODisposeHighResTime, OOGetHighResTime, and start.

Referenced by start.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop

- (void) stop

Definition at line 66 of file OOProfilingStopwatch.m.

67{
71 _running = NO;
72}

References _end, _running, _start, OODisposeHighResTime, OOGetHighResTime, and stop.

Referenced by stop.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stopwatch

+ (instancetype) stopwatch

Definition at line 45 of file OOProfilingStopwatch.m.

46{
47 return [[[self alloc] init] autorelease];
48}

References stopwatch.

Referenced by stopwatch, OOCacheManager(Private)::write, and OOCacheManager(Private)::writeDict:.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _end

- (OOHighResTimeValue) _end
private

Definition at line 150 of file OOProfilingStopwatch.h.

Referenced by currentTime, dealloc, init, reset, and stop.

◆ _running

- (BOOL) _running
private

Definition at line 151 of file OOProfilingStopwatch.h.

Referenced by currentTime, init, reset, start, and stop.

◆ _start

- (OOHighResTimeValue) _start
private

Definition at line 149 of file OOProfilingStopwatch.h.

Referenced by currentTime, dealloc, init, reset, start, and stop.


The documentation for this class was generated from the following files: