# timerinit - can i have the \$dif numbers i seconds?

## Recommended Posts

timerinit - can i have the \$dif numbers i seconds?

is there a way or an opt() ?

##### Share on other sites

divide by 1000

\$seconds = timerdiff(\$timer) / 1000

Edited by caleb41610
• 1

##### Share on other sites

From ms to sec you have to devide the result with 1000.

No opt() available just simple math.

Br,

UEZ

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

##### Share on other sites

divide by 1000

\$seconds = timerdiff(\$timer) / 1000

i did work even with

/ 1000 / 60 .. so i got it in minuts

but i get this kind of number 1.24959369367937

you know how to short it down to 3 or 4 decimals ?

##### Share on other sites

You can always trim the output down to what you would like. Something like this should work:

```\$start = TimerInit()
Sleep(30000)
MsgBox(0, "", StringTrimRight(TimerDiff(\$start) / 1000, 10))```

√-1 2^3 ∑ π, and it was delicious!

##### Share on other sites

Use stringformat for that

Live for the present,
Dream of the future,
Learn from the past.

##### Share on other sites

You can always trim the output down to what you would like. Something like this should work:

```\$start = TimerInit()
Sleep(30000)
MsgBox(0, "", StringTrimRight(TimerDiff(\$start) / 1000, 10))```

super but...

i need it in minuts before i short it down. HELP

##### Share on other sites

Caleb41610 already showed you a way to do this in Post #2. Create a couple of variables:

```\$sec = TimerDiff(\$start) / 1000
\$min = \$sec / 60```

Edit: Also, please do not PM members with the word HELP. I understand this is urgent for you; doesn't mean it is urgent for us Please stick to the forum to ask your questions.

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

##### Share on other sites

Caleb41610 already showed you a way to do this in Post #2. Create a couple of variables:

```\$sec = TimerDiff(\$start) / 1000
\$min = \$sec / 60```

Edit: Also, please do not PM members with the word HELP. I understand this is urgent for you; doesn't mean it is urgent for us Please stick to the forum to ask your questions.

[sOLVED] Thanks

##### Share on other sites

Try looking at Round() in the help file

## Create an account

Register a new account