Getting System.Microseconds

I was writing a quick test app to show System.Microseconds in a listbox and noticed something puzzling. I put this code in a 1-second timer:

Listbox1.AddRow(Str(System.Microseconds/1000000))

But each value came out the same instead of being 1 second apart. I had to get System.Microseconds first to get it to work as I wanted:

Var t as Double = System.Microseconds
Listbox1.AddRow(Str(t/1000000))

Is this to be expected or is it a bug?

I can’t reproduce your results.

What version of Xojo on which platform?

One second apart here:

Using the 2 lines version the fraction just swings:

Windows 11, Xojo 2024r1.1

But additionally I’m getting those “raw” values, for:

Listbox1.AddRow(System.Microseconds.ToString("#0.#"))

If sometimes you get timer events apart with gaps larger than 1 second, maybe your app may be busy, and Xojo could not fire the timer in a precise one second because it was busy when it should fire it.

Obs: The first “0” is not a value, it’s the column label.

Well, now I can’t reproduce the error either. I must have done something stupid.

Thanks for your help and I’m sorry to waste your time.