/* * Copyright 2001 Perforce Software. All rights reserved. * * This file is part of Perforce - the FAST SCM System. */ /* * Timer - lapse timer * * Timer is a OS specific object that measures lapse time. * * Classes: * Timer - lapse and CPU timer * FmtMs() - format milliseconds with varying precision * * Public methods: * Timer::Start() - restart the timer * Timer::Message() - format an OS-specific resource usage message * Timer::Time() - return MS since Start() * Timer::Reset() - restart the timer to the time of the last check */ class StrBuf; class StrMs : public StrPtr { public: StrMs( int ms ); private: char buf[ 24 ]; } ; class Timer { public: void Start(); void Message( StrBuf &msg ) { msg << StrMs( Time() ) << "s"; } int Time(); void Restart(); const StrPtr & Fmt( StrBuf &b ) const; void Parse( const StrPtr &v ); private: struct timer { long sec; long usec; } start, stop; static void Set( struct timer &t ); } ;
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 18760 | rlranft |
Populate -o //guest/perforce_software/p4/... //guest/rlranft/p4/.... |
||
//guest/perforce_software/p4/2014-2/sys/timer.h | |||||
#1 | 15903 | Matt Attaway | Everything should be happy now between the Workshop and the depot paths | ||
//guest/perforce_software/p4/2014_2/sys/timer.h | |||||
#1 | 15901 | Matt Attaway | Clean up code to fit modern Workshop naming standards | ||
//guest/perforce_software/p4/2014.2/sys/timer.h | |||||
#1 | 12189 | Matt Attaway | Initial (and much belated) drop of 2014.2 p4 source code |