Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to calulate duration of time
Message
De
25/05/1999 12:54:50
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
25/05/1999 12:43:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00222554
Message ID:
00222561
Vues:
17
>I want to calcualte a duration of time. Let's said i first click to a button then it will get the system time and store to a variable, later i click again the button and get the system time again.
>Now i want to calculate the time duration between the first and second click.
>Can i calculate it by :
>>>duration= time()-time()
>&&& first click time deduct second click time
>
>Any other good ways to get it ? i want to get the duration in total hours, minutes, seconds. each are separate !!!
>
>regard,
>chang
Chang,
Check stopwatch sample in solutions.app.
Another simple way :
if type("tSecs")="U"
public tSecs
tSecs = seconds() && If you want high accuracy
else
nElapsed = seconds()-tSecs
release tSecs
? floor(nElapsed / 3600), floor(nElapsed % 3600 / 60), nElapsed % 60
endif
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform