Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Bolt on February 04, 2022, 10:23:19 AM

Title: Rounding with FmtTMR
Post by: Bolt on February 04, 2022, 10:23:19 AM
Is there an "easy" way to use FmtTMR without displaying the seconds ( 00s) at the end?  Or do I need to make a FOR/NEXT loop, STRPRINT/FmtTMR to a helper string block, do MATH HelperString0.Length - 4 and STRTRUNC with this number?
Title: Re: Rounding with FmtTMR
Post by: franji1 on February 04, 2022, 10:44:40 AM
FmtTMR only goes to seconds (not to minutes), so you do have to do it by hand.
Title: Re: Rounding with FmtTMR
Post by: Bolt on February 04, 2022, 11:01:08 AM
Fair enough.  I'm looking at another angle here, is there an easy way to go from an integer in seconds, such as 3723, to a string formatted as 1h 2m( 3s)? Or do I need to multiply it by 1000 and then do FmtTMR anyways?
Title: Re: Rounding with FmtTMR
Post by: franji1 on February 04, 2022, 12:05:41 PM
Fair enough.  I'm looking at another angle here, is there an easy way to go from an integer in seconds, such as 3723, to a string formatted as 1h 2m( 3s)? Or do I need to multiply it by 1000 and then do FmtTMR anyways?

FmtTMR only works w/millisecond values, so you have to multiply seconds by 1000.