Oolite 1.91.0.7677-250528-09ed63a
All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Modules Pages
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 116 of file OOProfilingStopwatch.h.

Method Documentation

◆ currentTime

- (OOTimeDelta) currentTime

Definition at line 81 of file OOProfilingStopwatch.m.

82{
83 if (_running)
84 {
88 }
90}
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 54 of file OOProfilingStopwatch.m.

55{
58
59 [super dealloc];
60}

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 36 of file OOProfilingStopwatch.m.

37{
38 if ((self = [super init]))
39 {
42 _running = YES;
43 }
44 return self;
45}
#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 93 of file OOProfilingStopwatch.m.

94{
95 OOTimeDelta result;
96 if (_running)
97 {
101 _start = now;
102 }
103 else
104 {
108 }
109 return result;
110}
double OOTimeDelta
Definition OOTypes.h:224

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 63 of file OOProfilingStopwatch.m.

64{
68 _running = YES;
69}

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 72 of file OOProfilingStopwatch.m.

73{
77 _running = NO;
78}

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 48 of file OOProfilingStopwatch.m.

49{
50 return [[[self alloc] init] autorelease];
51}

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 120 of file OOProfilingStopwatch.h.

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

◆ _running

- (BOOL) _running
private

Definition at line 121 of file OOProfilingStopwatch.h.

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

◆ _start

- (OOHighResTimeValue) _start
private

Definition at line 119 of file OOProfilingStopwatch.h.

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


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