PrintTime

Files CCore/inc/PrintTime.h CCore/src/PrintTime.cpp

PrintTime() is a Creator function to build an object of the PrintTimeType.


template <class UInt>
PrintTimeType<UInt> PrintTime(UInt value) { return PrintTimeType<UInt>(value); }

PrintTimeType is a Helper Type, it prints a time, represented by an unsigned integral type in seconds.


template <class UInt>
class PrintTimeType
 {
   UInt value;
   
  public: 
  
   explicit PrintTimeType(UInt value_) : value(value_) {}
  
   template <class P>
   void print(P &out) const;
 };

Time is printed in the form hh:mm:ss or dd:hh:mm:ss.


Printf(Con,"#;\n",PrintTime(1000u)); // 00:16:40