MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / formatInterval

Function formatInterval

src/remote/server/ReplServer.cpp:561–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

559 typedef SortedArray<Segment*, EmptyStorage<Segment*>, FB_UINT64, Segment> ProcessQueue;
560
561 string formatInterval(const TimeStamp& start, const TimeStamp& finish)
562 {
563 static const SINT64 MSEC_PER_DAY = 24 * 60 * 60 * 1000;
564
565 const SINT64 startMsec = ((SINT64) start.value().timestamp_date) * MSEC_PER_DAY +
566 (SINT64) start.value().timestamp_time / 10;
567 const SINT64 finishMsec = ((SINT64) finish.value().timestamp_date) * MSEC_PER_DAY +
568 (SINT64) finish.value().timestamp_time / 10;
569
570 const SINT64 delta = finishMsec - startMsec;
571 const double seconds = (double) delta / 1000;
572
573 string value;
574 value.printf("%.3lfs", seconds);
575
576 return value;
577 }
578
579 bool validateHeader(const SegmentHeader* header)
580 {

Callers 1

process_archiveFunction · 0.85

Calls 2

valueMethod · 0.45
printfMethod · 0.45

Tested by

no test coverage detected