Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Time Elapsed
Message
De
06/06/2002 14:20:21
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00665357
Message ID:
00665611
Vues:
15
>Does FoxPro have a function that converts seconds
>to hour:minute:second?
>
>I am trying to calculate the time FoxPro takes to
>perform an action. I tried doing it this way:
>
> starttime=seconds()
>
> * carry out the action
>
> timetaken=seconds() - starttime
>
>Should I write a function to convert 'timetaken' to
>hours/minutes/seconds?
>
>Ria

Ria,

you may want to consider this
starttime = DateTime()
* carry out the action
timetaken=DateTime() - starttime && delta in seconds
x = ttoc( { 00:00 } + timetaken, 1)
x = substr(x,9,2) + ':' + substr(x,11,2) + ':' + right(x,2)

? x
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform