Re: (no subject)

new topic     » goto parent     » topic index » view thread      » older message » newer message

for a Sleep function that accepts partial seconds, try this:

constant KERNEL32 = open_dll("kernel32")
if KERNEL32 = 0 then
    puts(1,"Couldn't open kernel32.dll.\n") abort(1)
end if

constant pSleep = define_c_func(KERNEL32,"Sleep",{C_LONG},C_LONG)

-- REMEMBER Sleep time is in micro-seconds
global function Sleep(integer sleeptime)
    return c_func(pSleep,{sleeptime})
end function

-- pause 2 and a half seconds
junk = Sleep(2.5 * 1000)


Yours, OtterDad

Don't sweat it -- it's not real life. It's only ones and zeroes. Gene Spafford

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu