Re: unformated timeticks

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Wed, 8 Nov 1995 21:39:01 +0100

Hi!

Francois.Junique@jet.uk said:

Francois> we have found the following "problem":

Francois> set result [$sess get sysUpTime.0 varA.0]
Francois> set t [mib scan sysUpTime [lindex [lindex $result 0] 2]]
Francois> set val [lindex [lindex $result 1] 2]
Francois> puts [expr ($val - $mval) * 100. / ($t - $mt)]

Francois> with "mval" and "mt" being the values from the previous poll
Francois> to get the variation of "varA" per second

Francois> It is working fine except that we have to do a mib
Francois> scan each time!! How can we avoid this
Francois> formating/unformating each time for timeticks

The short answer is: You can't avoid this formatting/unformatting with
the current version.

The real question is whether this default formatting makes sense for
TimeTick values. It is nice if you just want to display the value but
annoying when you do computations (and sysUpTime is quite important
for most computations). I could remove the default formatting for
TimeTick values, but this would be somewhat inconsistent (since all
other values are formatted per default).

So there is obviously a need to control if automatic formatting should
happen or not. The question is how to control this in a flexible (and
readable) way. Are there any ideas out there?

Juergen