std::chrono::system_clock
De cppreference.com
| Defined in header <chrono>
|
||
| class system_clock; |
(depuis C++11) | |
La classe std::chrono::system_clock représente l'horloge système temps réel, en anglais wall clock par analogie à une horloge murale.
Elle n'est pas forcément monotone : sur la plupart des systèmes, l'horloge système peut être modifiée à tout moment, par exemple pour s'adapter au fuseau horaire.
C'est la seule horloge C++ dont un point dans le temps peut être directement associé à un temps de type C (std::time_t).
std::chrono::system_clock répond aux exigences du concept TrivialClock.
Sommaire |
[modifier] Types de membres
| Type du membre | Définition |
rep
|
type arithmétique signé permettant de représenter le nombre de mesures dans une durée de l'horloge |
period
|
un type std::ratio représentant la durée d'une mesure de l'horloge, en secondes |
duration
|
std::chrono::duration<rep, period>, le type représentant une durée, capable de représenter des durées négatives |
time_point
|
le type de point dans le temps de cette horloge, std::chrono::time_point<system_clock> |
[modifier] Constantes membres
| bool is_steady [ statique ]Original: static The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
true si l'horloge est monotone: le temps entre deux mesures est constant, c'est à dire que now() retourne des valeurs qui augmentent de manière contante même en cas d'ajustement externe de l'horloge (constante membre statique publique) |
[modifier] Fonctions membres
| [ statique ]Original: static The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
retourne un std::chrono::time_point représentant le point courant dans le temps Original: returns a std::chrono::time_point representing the current point in time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique statique) |
| [ statique ]Original: static The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
convertit un point dans le temps système de l'horloge à std::time_t Original: converts a system clock time point to std::time_t The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique statique) |
| [ statique ]Original: static The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
convertit std::time_t à un point dans le temps d'horloge système Original: converts std::time_t to a system clock time point The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique statique) |
[modifier] Voir aussi
| (C++11) |
horloge monotone dont le temps n'est jamais ajusté (classe) |
| (C++11) |
l'horloge avec la plus petit période disponible (classe) |

