Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
StopWatch Class Reference

Public Member Functions

void start ()
 
void stop ()
 
void print ()
 

Detailed Description

Definition at line 279 of file MyersTest.cpp.

Member Function Documentation

◆ print()

void StopWatch::print ( )
inline

Definition at line 293 of file MyersTest.cpp.

293 {
294 int64_t average = fAccumulatedTime.count() / fCount;
295 SkDebugf("average time: %" PRId64 " µs\n", average);
296 }
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1

◆ start()

void StopWatch::start ( )
inline

Definition at line 281 of file MyersTest.cpp.

281 {
282 fStart = std::chrono::high_resolution_clock::now();
283 }

◆ stop()

void StopWatch::stop ( )
inline

Definition at line 285 of file MyersTest.cpp.

285 {
286 std::chrono::high_resolution_clock::time_point stop =
287 std::chrono::high_resolution_clock::now();
288
289 fAccumulatedTime += std::chrono::duration_cast<std::chrono::microseconds>(stop - fStart);
290 fCount += 1;
291 }
void stop()

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