#80228 - 2001-06-24 12:41 AM
Let SLEEP sleep in milliseconds !
|
Jochen
KiX Supporter
   
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
Ruud,i think with todays systems speed a second is like an Eternity to the CPU ... Could we have this changed ? It's no problem for me but could be one for all who can't (or don't want to) use 3rd Party dll's . (or should i say Shawn Party dll's ? ) Hmm ... , or for compatibility reasons add a WAIT or DELAY function regards Jochen
_________________________
|
|
Top
|
|
|
|
#80230 - 2001-06-26 01:15 PM
Re: Let SLEEP sleep in milliseconds !
|
Anonymous
Anonymous
Unregistered
|
To Shawn !Kix has some commands to parralel the kbhit() funcrtion GET Action: Accepts a single character from the keyboard and stores the character in a variable. Syntax GET $x Remarks The character is stored in the specified script variable. If a function key, such as F1, is pressed, GET returns 0, and @ERROR returns the key code of the function key. GETS Action Reads a line of characters from the keyboard until the <ENTER> key is pressed, and stores the result in a variable. Syntax GETS $x Thomas
|
|
Top
|
|
|
|
#80231 - 2001-06-26 01:22 PM
Re: Let SLEEP sleep in milliseconds !
|
Jochen
KiX Supporter
   
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
Thomas ,but a kbhit() function won't, unlike get or gets, stop the Script Execution ... sample of how to FlushKB with Shawns Kixlib32.dll : code:
$kixlib = createobject("kixlib32.library") while $kixlib.kbhit get $k loop
You won't be able to do this with pure Kix ! Jochen btw. : Welcome 'on board' 
[This message has been edited by jpols (edited 26 June 2001).]
_________________________
|
|
Top
|
|
|
|
#80233 - 2001-06-30 01:28 AM
Re: Let SLEEP sleep in milliseconds !
|
cj
MM club member
   
Registered: 2000-04-06
Posts: 1102
Loc: Brisbane, Australia
|
Lonkero,One of the most useful reasons for milliseconds is for timing things. I wouldn't want to pause a script for 10ms, but I would like to know the milliseconds now, then after an operation. Sort of like this: $start=@milliseconds ;new imaginary KiX macro that returns the milliseconds part of the current time ; my command here "My command took " @milliseconds-$start "ms" ? So, rather than the milliseconds of the current time, I would like to have the CPU ticks. That is, the milliseconds since last power on.
cj
|
|
Top
|
|
|
|
#80237 - 2001-07-18 02:32 PM
Re: Let SLEEP sleep in milliseconds !
|
Anonymous
Anonymous
Unregistered
|
@MSECS will be included in the final build.Ruud
|
|
Top
|
|
|
|
#80246 - 2001-07-20 02:53 AM
Re: Let SLEEP sleep in milliseconds !
|
cj
MM club member
   
Registered: 2000-04-06
Posts: 1102
Loc: Brisbane, Australia
|
I know the feeling.Let me summarise then. I would like to see a new command and a new macro: DELAY(iMS) - delay in milliseconds @TICKS - number of system ticks since last poweron I have (and I'm sure Jochen has) some/many scripts that are waiting for these functions. What we have: SLEEP(iS) - delay in seconds @MSECS - number of milliseconds of current time. We can use UDFs and WSH calls to get by in the meantime. cj
|
|
Top
|
|
|
|
Moderator: Lonkero, ShaneEP, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart
|
0 registered
and 699 anonymous users online.
|
|
|