SNAP Library 4.0, Developer Reference  2017-07-27 13:18:06
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TExeTm Class Reference

#include <tm.h>

Public Member Functions

 TExeTm ()
 
 TExeTm (const TExeTm &Tm)
 
TExeTmoperator= (const TExeTm &Tm)
 
void Tick ()
 
int GetTime () const
 
double GetSecs () const
 
int GetSecInt ()
 
const char * GetStr () const
 
TStr GetStr2 () const
 
const char * GetTmStr () const
 

Static Public Member Functions

static char * GetCurTm ()
 

Private Attributes

int LastTick
 

Detailed Description

Definition at line 355 of file tm.h.

Constructor & Destructor Documentation

TExeTm::TExeTm ( )
inline

Definition at line 359 of file tm.h.

References Tick().

359 : LastTick(0) { Tick(); }
int LastTick
Definition: tm.h:357
void Tick()
Definition: tm.h:364

Here is the call graph for this function:

TExeTm::TExeTm ( const TExeTm Tm)
inline

Definition at line 360 of file tm.h.

360 : LastTick(Tm.LastTick) { }
int LastTick
Definition: tm.h:357

Member Function Documentation

static char* TExeTm::GetCurTm ( )
inlinestatic

Definition at line 374 of file tm.h.

References TStr::CStr(), TSecTm::GetCurTm(), and TSecTm::GetTmStr().

Referenced by TTimeNet::PlotMissingPast(), and TLocClustStat::Run().

374 { static TStr TmStr; TmStr=TSecTm::GetCurTm().GetTmStr(); return TmStr.CStr(); }
Definition: dt.h:412
static TSecTm GetCurTm()
Definition: tm.cpp:697
TStr GetTmStr() const
Definition: tm.cpp:520
char * CStr()
Definition: dt.h:476

Here is the call graph for this function:

Here is the caller graph for this function:

int TExeTm::GetSecInt ( )
inline

Definition at line 367 of file tm.h.

References GetSecs(), and TFlt::Round().

367 { return TFlt::Round(GetSecs()); }
static int Round(const double &Flt)
Definition: dt.h:1429
double GetSecs() const
Definition: tm.h:366

Here is the call graph for this function:

TStr TExeTm::GetStr2 ( ) const
inline

Definition at line 369 of file tm.h.

References GetTmStr().

369 {return GetTmStr();}
const char * GetTmStr() const
Definition: tm.h:370

Here is the call graph for this function:

int TExeTm::GetTime ( ) const
inline

Definition at line 365 of file tm.h.

References LastTick.

Referenced by TTmStopWatch::GetTime(), and TTmStopWatch::Stop().

365 {return int(clock()-LastTick);}
int LastTick
Definition: tm.h:357

Here is the caller graph for this function:

const char* TExeTm::GetTmStr ( ) const
inline

Definition at line 370 of file tm.h.

References GetSecs().

Referenced by TMAGFitBern::DoEStep(), TMAGFitBern::DoMStep(), TGHash< TDat >::DrawGViz(), TSubGraphsEnum::EnumSubGraphs(), TKronMtx::GenKronecker(), TCesnaUtil::GetNIdPhiV(), TAGMFastUtil::GetNIdPhiV(), GetStr(), GetStr2(), TKroneckerLL::GradDescentConvergence(), TTimeNet::LoadArxiv(), TTimeNet::LoadPatents(), TAGMFast::MLEGradAscent(), TCoda::MLEGradAscent(), TCesna::MLEGradAscent(), TAGMFit::MLEGradAscentGivenCAG(), TAGMFast::MLEGradAscentParallel(), TCesna::MLEGradAscentParallel(), TLogRegFit::MLEGradient(), TAGMFast::MLENewton(), TLogRegFit::MLENewton(), TAGMFast::NeighborComInit(), TAGMFit::NeighborComInit(), TTimeNet::PlotEffDiam(), TTimeNENet::PlotEffDiam(), TTimeNet::PlotMissingPast(), TSubGraphsEnum::RecurBfs(), TSubGraphsEnum::RecurBfs1(), TKroneckerLL::RunEStep(), TAGMFit::RunMCMC(), TKroneckerLL::RunMStep(), TKroneckerLL::SampleGradient(), TGStat::TakeBasicStat(), TGStat::TakeBccStat(), TGStat::TakeClustCf(), TGStat::TakeConnComp(), TGStat::TakeDegDistr(), TGStat::TakeDiam(), TGStat::TakeSccStat(), TGStat::TakeSpectral(), TGStat::TakeTriadPart(), TKroneckerLL::TestKronDescent(), TKroneckerLL::TestSamplePerm(), and TTimeNENet::TimeGrowth().

370  { static char TmStr[32];
371  if (GetSecs() < 60) { sprintf(TmStr, "%.2fs", GetSecs()); }
372  else if (GetSecs() < 3600) { sprintf(TmStr, "%02dm%02ds", int(GetSecs())/60, int(GetSecs())%60); }
373  else { sprintf(TmStr, "%02dh%02dm", int(GetSecs())/3600, (int(GetSecs())%3600)/60); } return TmStr; }
double GetSecs() const
Definition: tm.h:366

Here is the call graph for this function:

Here is the caller graph for this function:

TExeTm& TExeTm::operator= ( const TExeTm Tm)
inline

Definition at line 361 of file tm.h.

References LastTick.

361  {
362  LastTick=Tm.LastTick; return *this;}
int LastTick
Definition: tm.h:357

Member Data Documentation

int TExeTm::LastTick
private

Definition at line 357 of file tm.h.

Referenced by GetSecs(), GetTime(), operator=(), and Tick().


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