On Thu, 19 Apr 2001, Daniël Mantione wrote:
> > Some are undoubtedly left over from the AOLserver 2.x days when Tcl 7.4
> > did not have many functions that have since been added (in 7.6 & 8.x).
> > There is no real reason for [ns_time] over [clock seconds], but the former
> > persists for compatability purposes, and [clock] didn't appear until Tcl
> > 7.5 or 7.6.
>
> What is recommended, the ns_xxx commands or the Tcl ones?
I tend to stick with the ns_* commands, out of sheer force of habit. (In
fact, I wrote a pure Tcl 8 package, nstcl, so that I could use the same
syntax in tcl/tk outside of AOLserver. See
http://michael.cleverly.com/aolserver/nstcl).
If for some reason you need every last bit of raw speed then the native
Tcl commands are probably better as they seem to be (slightly) more
efficient (perhaps because of the way Tcl byte-code compiling works?).
server1:nscp 1> time { clock seconds } 1000
3 microseconds per iteration
server1:nscp 2> time { ns_time } 1000
11 microseconds per iteration
(Tested on a dual P3-600 running RH Linux 6.2 & AOLserver 3.2+ad12.)