Logo Search packages:      
Sourcecode: pwlib version File versions

void PTimeInterval::ReadFrom ( istream &  strm  )  [virtual, inherited]

Input the time interval from the I/O stream. This expects the input to be a signed decimal integer number.

Parameters:
strm  I/O stream to input the time interval from.

Reimplemented from PObject.

Definition at line 229 of file ptime.cxx.

References PTimeInterval::SetInterval().

Referenced by PTimeInterval::PTimeInterval().

{
  long day = 0;
  long hour = 0;
  long min = 0;
  float sec;
  strm >> sec;
  while (strm.peek() == ':') {
    day = hour;
    hour = min;
    min = (long)sec;
    strm.get();
    strm >> sec;
  }

  SetInterval(((long)(sec*1000))%1000, (int)sec, min, hour, day);
}


Generated by  Doxygen 1.6.0   Back to index