> Le 6 sept. 2016 à 10:52, stardata.info <[email protected]> a écrit :
> 
> Hi All,
> 
> I need to check the timeout in one communication process.
> For timeout qty i use ticks unity, how i can do for to measure if the timeout 
> inserted is elapsed?
> I have current time, but he is not expressed in ticks, is necessary to 
> convert the current time in ticks?
> Someone have a code for do this?

1 second is 60 ticks, so you just have to multiply or divide depending on the 
conversion direction. 

for example

• from hour to ticks:

$startTime:=Current time
//...delay...
$elapsedInSeconds:=(Current time-$startTime)+0  //add zero to convert hours in 
seconds
$elapsedInTicks:=$elapsedSeconds\60  //divide with "\" instead of "/" to obtain 
an integer

• from ticks to hour:

$startTicks:=Tick count
//...delay...
$elapsedInTicks:=Tick count-$startTicks
$elepsedInTime:=(Time(Time string(($elapsedInTicks)\\60))

-- 
Arnaud de Montard


**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to