Back to index

unity  6.0.0
Public Member Functions | Protected Member Functions
unity::performance::ElapsedTimeMonitor Class Reference

#include <ElapsedTimeMonitor.h>

Inheritance diagram for unity::performance::ElapsedTimeMonitor:
Inheritance graph
[legend]
Collaboration diagram for unity::performance::ElapsedTimeMonitor:
Collaboration graph
[legend]

List of all members.

Public Member Functions

std::string GetName () const
void Start ()
GVariant * Stop ()

Protected Member Functions

void StartMonitor ()
void StopMonitor (GVariantBuilder *builder)

Detailed Description

Definition at line 31 of file ElapsedTimeMonitor.h.


Member Function Documentation

std::string unity::performance::ElapsedTimeMonitor::GetName ( ) const [virtual]

Implements unity::performance::Monitor.

Definition at line 28 of file ElapsedTimeMonitor.cpp.

{
  return "ElapsedTimeMonitor";
}
void unity::performance::Monitor::Start ( ) [inherited]

Definition at line 25 of file Monitor.cpp.

{
  StartMonitor ();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Implements unity::performance::Monitor.

Definition at line 33 of file ElapsedTimeMonitor.cpp.

{
  clock_gettime(CLOCK_MONOTONIC, &_start);
}
GVariant * unity::performance::Monitor::Stop ( ) [inherited]

Definition at line 30 of file Monitor.cpp.

{
  GVariantBuilder builder;

  g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT);
  StopMonitor (&builder);

  return g_variant_new ("a{sv}", &builder);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void unity::performance::ElapsedTimeMonitor::StopMonitor ( GVariantBuilder *  builder) [protected, virtual]

Implements unity::performance::Monitor.

Definition at line 38 of file ElapsedTimeMonitor.cpp.

{
  struct timespec current;
  clock_gettime(CLOCK_MONOTONIC, &current);
  int diff = TimeUtil::TimeDelta(&current, &_start);

  variant::BuilderWrapper(builder)
    .add("elapsed-time", diff);
}

Here is the call graph for this function:


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