~3v1n0/unity/overlay-border-scale

« back to all changes in this revision

Viewing changes to plugins/unityshell/src/ElapsedTimeMonitor.cpp

  • Committer: Daniel van Vugt
  • Date: 2012-03-14 06:24:18 UTC
  • mfrom: (2108 unity)
  • mto: This revision was merged to the branch mainline in revision 2146.
  • Revision ID: daniel.van.vugt@canonical.com-20120314062418-nprucpbr0m7qky5e
MergedĀ latestĀ lp:unity

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
* Authored by: Alex Launi <alex.launi@canonical.com>
18
18
*/
19
19
 
 
20
#include <UnityCore/Variant.h>
 
21
 
20
22
#include "ElapsedTimeMonitor.h"
21
23
#include "TimeUtil.h"
22
24
 
39
41
  clock_gettime(CLOCK_MONOTONIC, &current);
40
42
  int diff = TimeUtil::TimeDelta(&current, &_start);
41
43
 
42
 
  g_variant_builder_add(builder, "{sv}", "elapsed-time", g_variant_new_uint32(diff));
 
44
  variant::BuilderWrapper(builder)
 
45
    .add("elapsed-time", diff);
43
46
}
44
47
 
45
48
}