Oolite 1.91.0.7645-241119-222d325
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 116 of file OOProfilingStopwatch.h.

Method Documentation

◆ currentTime

- (OOTimeDelta) currentTime

Definition at line 115 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 EXPECT_NOT.

◆ dealloc

- (void) dealloc
implementation

Definition at line 115 of file OOProfilingStopwatch.m.

55{
58
59 [super dealloc];
60}

◆ init

- (id) init
implementation

Definition at line 115 of file OOProfilingStopwatch.m.

37{
38 if ((self = [super init]))
39 {
42 _running = YES;
43 }
44 return self;
45}
#define OOCopyHighResTime(time)

◆ reset

- (OOTimeDelta) reset

Definition at line 115 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

◆ start

- (void) start

Definition at line 115 of file OOProfilingStopwatch.m.

64{
68 _running = YES;
69}

◆ stop

- (void) stop

Definition at line 115 of file OOProfilingStopwatch.m.

73{
77 _running = NO;
78}

◆ stopwatch

+ (instancetype) stopwatch

Definition at line 115 of file OOProfilingStopwatch.m.

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

Member Data Documentation

◆ _end

- (OOHighResTimeValue) _end
private

Definition at line 120 of file OOProfilingStopwatch.h.

◆ _running

- (BOOL) _running
private

Definition at line 121 of file OOProfilingStopwatch.h.

◆ _start

- (OOHighResTimeValue) _start
private

Definition at line 119 of file OOProfilingStopwatch.h.


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