[Swan-dev] hi resolution time in log file

D. Hugh Redelmeier hugh at mimosa.com
Mon Oct 30 19:11:26 UTC 2017


| From: Andrew Cagney <andrew.cagney at gmail.com>

| I noticed that the timestamp added to log files has only a 1 second
| resolution; this isn't much help when multiple events get processed per
| second.

I haven't read logs much in a long time.  So my opinions should be
taken with a grain of salt.

Most of Pluto is a single thread.  The relationship between log lines
is mostly sequential.  So fine-grained timing isn't important.

| PS: I'm also left wondering why delta time isn't a double, would make
| specifying sub-second timers a lot easier (i.e., 0.5)

In the past, there was some advantage in never using floating point.
That may be true on systems that use static linking and on some
embedded systems.

FP object code is generally fatter and slower than integer code, but
perhaps not when the representation is wider than the integer ALU.

Floating point is very hard to reason about.  It has all sorts of
surprises.  God invented the integers.

Many months ago I coded a change to represent in a higher precision,
with an opaque type.  Before I got it checked in, the tree changed
(event handling rewrite?) and I never got around to merging.


More information about the Swan-dev mailing list