#include "fxlib.h" #include "revolution.h" //pour RTCReadSecond() void PrintInt(int n) //écrit un entier dans une chaine et l'affiche a l'écran { char str[20]="0"; int i, l=0; for(i=n ; i ; i/=10) l++; for(i=n ; i ; i/=10) str[--l] = i%10+'0'; Print(str); } int AddIn_main(int isAppli, unsigned short OptionNum) { int time1, time2, i; time1 = RTCReadSecond(); //lit les secondes a l'horloge du processeur for(i=0 ; i<100000000 ; i++); //boucle 100 000 000 fois time2 = RTCReadSecond(); locate(1, 1); //place le curseur pour positionner le texte PrintInt((time2-time1+60)%60); //affiche un entier GetKey(&i); //pause return 1; } #pragma section _BR_Size unsigned long BR_Size; #pragma section #pragma section _TOP int InitializeSystem(int isAppli, unsigned short OptionNum) { return INIT_ADDIN_APPLICATION(isAppli, OptionNum); } #pragma section