Import Tcl-core 8.6.6 (as of svn r86089)
This commit is contained in:
24
tools/tsdPerf.tcl
Normal file
24
tools/tsdPerf.tcl
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
package require Thread
|
||||
|
||||
set ::tids [list]
|
||||
for {set i 0} {$i < 4} {incr i} {
|
||||
lappend ::tids [thread::create [string map [list IVALUE $i] {
|
||||
set curdir [file dirname [info script]]
|
||||
load [file join $curdir tsdPerf[info sharedlibextension]]
|
||||
|
||||
while 1 {
|
||||
tsdPerfSet IVALUE
|
||||
}
|
||||
}]]
|
||||
}
|
||||
|
||||
puts TIDS:$::tids
|
||||
|
||||
set curdir [file dirname [info script]]
|
||||
load [file join $curdir tsdPerf[info sharedlibextension]]
|
||||
|
||||
tsdPerfSet 1234
|
||||
while 1 {
|
||||
puts "TIME:[time {set value [tsdPerfGet]} 1000] VALUE:$value"
|
||||
}
|
||||
Reference in New Issue
Block a user