Changeset ef52d6 in git for Tst/Manual/timer.tst
- Timestamp:
- Dec 18, 2012, 5:04:21 PM (11 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38dfc5131670d387a89455159ed1e071997eec94')
- Children:
- 0af505365c0db7db1ac041d1125dedac4eae4fb392f57dbcba17f2e1c06d0cc8f0fb986aa4a45d42
- Parents:
- 2cdd72c35095d3ff171783d5f5a677d4f6658c96
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Tst/Manual/timer.tst
r2cdd72 ref52d6 1 1 LIB "tst.lib"; tst_init(); 2 timer=1; // The time of each command is printed3 int t=timer; // initialize t by timer4 2 ring r=0,(x,y,z),dp; 3 timer = 0; 5 4 poly p=(x+2y+3z+4xy+5xz+6yz)^20; 6 5 // timer as int_expression: 7 t=timer-t;8 t ;// yields the time in ticks-per-sec (default 1)9 // since t was initialized by timer6 int t = timer; 7 tst_ignore(string(t)); // yields the time in ticks-per-sec (default 1) 8 // since t was initialized by timer 10 9 int tps=system("--ticks-per-sec"); 11 t/tps; // yields the time in seconds truncated to int 10 tst_ignore(string(t div tps)); // yields the time in seconds truncated to int 11 system("--ticks-per-sec",1000); // set timer resolution to ms 12 12 timer=0; 13 system("--ticks-per-sec",1000); // set timer resolution to ms14 t=timer; // initialize t by timer15 13 p=(x+2y+3z+4xy+5xz+6yz)^20; 16 t imer-t; // time in ms14 tst_ignore(string(timer)); // time in ms 17 15 tst_status(1);$
Note: See TracChangeset
for help on using the changeset viewer.