29 messages in org.openoffice.fr.progRe: [prog] Chronomètre
FromSent OnAttachments
Michel GrentzingerOct 9, 2007 7:53 am 
Laurent GodardOct 9, 2007 8:25 am 
Bernard MarcellyOct 9, 2007 10:02 am 
Laurent GodardOct 9, 2007 10:11 am 
Michel GrentzingerOct 9, 2007 10:58 am 
Anthony BenoistOct 9, 2007 4:15 pm 
Serge LE LOUARNEOct 10, 2007 12:43 am 
Anthony BenoistOct 10, 2007 1:06 am 
Serge LE LOUARNEOct 10, 2007 1:18 am 
Bernard MarcellyOct 10, 2007 6:03 am 
Anthony BenoistOct 10, 2007 6:28 am 
Michel GrentzingerOct 10, 2007 11:38 am 
Anthony BenoistOct 10, 2007 12:47 pm 
Laurent GodardOct 10, 2007 1:30 pm 
Anthony BenoistOct 10, 2007 3:07 pm 
Bernard MarcellyOct 11, 2007 5:17 am 
Michel GrentzingerOct 11, 2007 5:40 am 
Bernard MarcellyOct 11, 2007 6:02 am 
Francois GattoOct 11, 2007 10:22 am 
Anthony BenoistOct 11, 2007 10:26 am 
Anthony BenoistOct 11, 2007 10:37 am 
Michel GrentzingerOct 11, 2007 11:01 am 
Bernard MarcellyOct 11, 2007 11:37 am 
Hervé GracOct 11, 2007 11:54 am 
Michel GrentzingerOct 11, 2007 1:26 pm 
christianwtdOct 13, 2007 8:11 am 
Bernard MarcellyOct 13, 2007 12:49 pm 
Bernard MarcellyOct 13, 2007 1:04 pm 
christianwtdOct 14, 2007 1:56 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [prog] ChronomètreActions...
From:christianwtd (chri@free.fr)
Date:Oct 13, 2007 8:11:49 am
List:org.openoffice.fr.prog

Bernard Marcelly a écrit :

Bonjour, Alors voici ma solution. ...

Aucune critique.

En revanche j'ai jeté un œil dans le code macro d'Antony Benoist. Je trouve que OOoBasic se comporte curieusement :

Sur une instruction : oFeuille.getCellByPosition(1, i).string = Time() affiche l'heure. Normal, sauf l'affichage, qui affiche le fameux apostrophe devant l'heure. Mais si je fais : oFeuille.getCellByPosition(1, i).Value = Time me retourne 16, si par exemple il est 16:21:43 Une modif comme : oFeuille.getCellByPosition(1, i).Value = Now et avec un bon formatage cellule retourne bien : 16:21:43

Est-ce bien normal ?

Remarque: Si vous avez cliqué plusieurs fois très rapidement sur OK du message Top! vous aurez remarqué qu'il s'écoule un délai minimal (environ 0,12 à 0,17 seconde entre deux tops sur mon PC). Je me suis demandé si on pouvait aller plus vite. Avec plusieurs variantes, MsgBox ou boutons de formulaire, même en faisant un codage plus rapide qui se contente de stocker les SystemTicks dans un tableau, j'obtiens toujours ce délai minimum entre deux tops. Probablement inhérent à la lenteur de OooBasic et API. C'est pourquoi je trouve que c'est un mauvais chronomètre.

A propos de GetSystemTicks() Sur un PC elle renvoie un nombre de millisecondes. Mais l'horloge matérielle utilisée pour cela a une période de 16ms environ, et la valeur obtenue a donc cette imprécision.

J'ai cru comprendre que le nombre de cycles varie suivant les systèmes d'exploitation et/ou les machines, d'où l'idée de calibrer la bécane avec un bout de code avant de lancer le chrono. Bonne ou mauvaise idée ?

... Bonne journée Bernard

Bon week-end et bon surf, Christian