🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fr.comp.lang.c
Article #15207

Re: notion de temps

#15207
From: Antoine Leca
Date: Wed, 05 Oct 2005 08:42
24 lines
1988 bytes
En <news:mn.2a1a7d5afd420743.31483@laposte.net>,
 Pierre Maurette va escriure:
>> Comment avoir une notion de temps en C ?
> La seule chose portable que je vois, c'est clock()  de <time.h>:

Mmmh. clock() te donne une estimation du temps pass� dans ton programme;
c'est diff�rent du temps qui passe (celui de l'horloge), qui est mod�lis�
par time().

Et je pense que ce que veux "gil", c'est une estimation du temps qui passe.
Genre time(), localtime(), ajouter atoi(argv[1]) secondes, mktime(), et
ensuite boucler tant que time() n'a pas atteint cette heure-l�.

�videmment, si le syst�me ne fait rien d'utile dans le � tant que �, c'est
peut-�tre du g�chis.


> Il vaudrait mieux passer par les fonctions de l'OS s'il est d�termin�,
> ce qui semble �tre le cas.

Je pense aussi.


Antoine
Technical Details
Message-ID: <di03lg$l0r$1@shakotay.alphanet.ch>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!freenix!news.alphanet.ch!alphanet.ch!not-for-mail
References: <dhuute$h61$1@apollon.grec.isp.9tel.net> <mn.2a1a7d5afd420743.31483@laposte.net>

Show Full Headers
Complete Article Headers
X-Google-Thread: f9822,4e02ca09709eaded
X-Google-Attributes: gidf9822,public
X-Google-Language: FRENCH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!freenix!news.alphanet.ch!alphanet.ch!not-for-mail
From: "Antoine Leca" <root@localhost.invalid>
Newsgroups: fr.comp.lang.c
Subject: Re: notion de temps
Date: Wed, 5 Oct 2005 10:42:15 +0200
Organization: Posted through ALPHANET (http://www.alphanet.ch/)
Lines: 25
Sender: antoinel@143.red-217-127-250.staticip.rima-tde.net
Message-ID: <di03lg$l0r$1@shakotay.alphanet.ch>
References: <dhuute$h61$1@apollon.grec.isp.9tel.net> <mn.2a1a7d5afd420743.31483@laposte.net>
NNTP-Posting-Host: 143.red-217-127-250.staticip.rima-tde.net
Mime-Version: 1.0
Content-Type: text/plain;
 charset="iso-8859-15"
Content-Transfer-Encoding: 8bit
X-Trace: shakotay.alphanet.ch 1128501746 21531 217.127.250.143 (5 Oct 2005 08:42:26 GMT)
X-Complaints-To: usenet@alphanet.ch
NNTP-Posting-Date: Wed, 5 Oct 2005 08:42:26 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506