'jour Voir MSDN ! et l'API GetTickCount "The GetTickCount function retrieves the number of milliseconds that have elapsed since the system was started. It is limited to the resolution of the system timer" A noter "The elapsed time is stored as a DWORD value. Therefore, the time will wrap around to zero if the system is run continuously for 49.7 days. If you need a higher resolution timer, use a multimedia timer or a high-resolution timer. Windows NT/2000: To obtain the time elapsed since the computer was started, retrieve the System Up Time counter in the performance data in the registry key HKEY_PERFORMANCE_DATA. The value returned is an 8-byte value. For more information, see Performance Monitoring. "
La function n'est donc plus pertinente si le system fonctionne depuis plus de 49.7 jours! Mais qui peut imaginer que windows reste stable aussi longtemps? Pas même MS qui a discretement informé que XP planté automatiquement aprés 49.7 jours!
@+
"xx" a écrit dans le message de news:
Bonjour
Je me demandais s'il n'y avait pas une variable interne quelconque pour obtenir la date/heure de demarrage du programme.
Juste pour economiser l'instruction Dim dTIM_000 As Date dTIM_000 = Now
Merci
'jour
Voir MSDN ! et l'API GetTickCount
"The GetTickCount function retrieves the number of milliseconds that have
elapsed since the system was started. It is limited to the resolution of the
system timer"
A noter
"The elapsed time is stored as a DWORD value. Therefore, the time will wrap
around to zero if the system is run continuously for 49.7 days.
If you need a higher resolution timer, use a multimedia timer or a
high-resolution timer.
Windows NT/2000: To obtain the time elapsed since the computer was started,
retrieve the System Up Time counter in the performance data in the registry
key HKEY_PERFORMANCE_DATA. The value returned is an 8-byte value. For more
information, see Performance Monitoring. "
La function n'est donc plus pertinente si le system fonctionne depuis
plus de 49.7 jours!
Mais qui peut imaginer que windows reste stable aussi longtemps?
Pas même MS qui a discretement informé que XP planté automatiquement
aprés 49.7 jours!
@+
"xx" <xx@nospam.net> a écrit dans le message de
news:Ox5G6QeUDHA.2456@TK2MSFTNGP09.phx.gbl...
Bonjour
Je me demandais s'il n'y avait pas une variable interne quelconque pour
obtenir la date/heure de demarrage du programme.
Juste pour economiser l'instruction
Dim dTIM_000 As Date
dTIM_000 = Now
'jour Voir MSDN ! et l'API GetTickCount "The GetTickCount function retrieves the number of milliseconds that have elapsed since the system was started. It is limited to the resolution of the system timer" A noter "The elapsed time is stored as a DWORD value. Therefore, the time will wrap around to zero if the system is run continuously for 49.7 days. If you need a higher resolution timer, use a multimedia timer or a high-resolution timer. Windows NT/2000: To obtain the time elapsed since the computer was started, retrieve the System Up Time counter in the performance data in the registry key HKEY_PERFORMANCE_DATA. The value returned is an 8-byte value. For more information, see Performance Monitoring. "
La function n'est donc plus pertinente si le system fonctionne depuis plus de 49.7 jours! Mais qui peut imaginer que windows reste stable aussi longtemps? Pas même MS qui a discretement informé que XP planté automatiquement aprés 49.7 jours!
@+
"xx" a écrit dans le message de news:
Bonjour
Je me demandais s'il n'y avait pas une variable interne quelconque pour obtenir la date/heure de demarrage du programme.
Juste pour economiser l'instruction Dim dTIM_000 As Date dTIM_000 = Now
Merci
Bismark Prods
qui a dis que c'était éphémère ?
Tu pose un postulat bien injuste je trouve ici !
"Pierre Alexis" a écrit dans le message de news:
Salut Simon,
Tu as écrit :
> il n'est pas interdit d'utiliser un truc qui s'appelle la base de
registre
Pas vraiment approprié dans ce cas-ci.... La base de registre n'est pas destinée à sauvergarder des données éphémères.