 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Sebastian Stelzer Guest
|
Posted: Tue Nov 25, 2003 4:54 pm Post subject: Wie bekomme ich die aktuelle Zeit? |
|
|
Hi,
ich hab ne Frage:
Wie bekommen ich die aktuelle Zeit heraus?
Ich hab schon irgendeinen Verdacht, dass es in der time.h
steckt, aber was konkretes weich ich nicht.
Danke im Voraus!
--
de.comp.lang.iso-c++ - Moderation: mailto:voyager+mod (AT) bud (DOT) prima.de
FAQ: http://www.voyager.prima.de/cpp/ mailto:voyager+send-faq (AT) bud (DOT) prima.de
|
|
| Back to top |
|
 |
Wolfgang Kaufmann Guest
|
Posted: Wed Nov 26, 2003 9:33 am Post subject: Re: Wie bekomme ich die aktuelle Zeit? |
|
|
* Thus spoke Sebastian Stelzer <bitmaster5714 (AT) gmx (DOT) de>:
Hallo,
| Quote: | Wie bekommen ich die aktuelle Zeit heraus?
Ich hab schon irgendeinen Verdacht, dass es in der time.h
steckt, aber was konkretes weich ich nicht.
|
Du meinst:
$ man 2 time
| Quote: | #include <time.h
time_t time(time_t *t);
|
$ man 2 gettimeofday
| Quote: | #include
#include
int gettimeofday(struct timeval *tv, struct timezone *tz);
int settimeofday(const struct timeval *tv , const struct timezone *tz);
struct timeval {
time_t tv_sec; /* seconds */
suseconds_t tv_usec; /* microseconds */
};
struct timezone {
int tz_minuteswest; /* minutes W of Greenwich */
int tz_dsttime; /* type of dst correction */
};
|
Die C++ Version des C Standard-Headers
Wolfgang.
--
"Es gibt Dinge, die man bereut, ehe man sie tut. Und man tut sie doch."
-- Christian Friedrich Hebbel
--
de.comp.lang.iso-c++ - Moderation: mailto:voyager+mod (AT) bud (DOT) prima.de
FAQ: http://www.voyager.prima.de/cpp/ mailto:voyager+send-faq (AT) bud (DOT) prima.de
|
|
| Back to top |
|
 |
Sebastian Stelzer Guest
|
Posted: Wed Nov 26, 2003 4:24 pm Post subject: Re: Wie bekomme ich die aktuelle Zeit? |
|
|
Wolfgang Kaufmann wrote:
| Quote: | * Thus spoke Sebastian Stelzer <bitmaster5714 (AT) gmx (DOT) de>:
Hallo,
Wie bekommen ich die aktuelle Zeit heraus?
Ich hab schon irgendeinen Verdacht, dass es in der time.h
steckt, aber was konkretes weich ich nicht.
Du meinst:
$ man 2 time
| #include <time.h
|
| time_t time(time_t *t);
$ man 2 gettimeofday
| #include
| #include
|
| int gettimeofday(struct timeval *tv, struct timezone *tz);
| int settimeofday(const struct timeval *tv , const struct timezone *tz);
|
| struct timeval {
| time_t tv_sec; /* seconds */
| suseconds_t tv_usec; /* microseconds */
| };
|
| struct timezone {
| int tz_minuteswest; /* minutes W of Greenwich */
| int tz_dsttime; /* type of dst correction */
| };
Die C++ Version des C Standard-Headers
Wolfgang.
Ja. |
Danke!
--
de.comp.lang.iso-c++ - Moderation: mailto:voyager+mod (AT) bud (DOT) prima.de
FAQ: http://www.voyager.prima.de/cpp/ mailto:voyager+send-faq (AT) bud (DOT) prima.de
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|