Fecha del código fuente de la página web
# incluir ltwindows.h gt
Usar espacio de nombres std
void main()
{
SYSTEMTIME time; // Declaración de estructura de tiempo, esta estructura es el sistema,
getsystem time(amp; time); // Llamada para obtener la API de tiempo del sistema.
//GetLocalTime(); Esta función se utiliza para obtener la API de hora local.
char *t_y;
char *t_m;
char *t_h;
char *t_ Min
char * t _ s;
char * t _ Mi
char * t _ d
char * t _ w; p>SYSTEMTIME time; // Declaración de estructura de tiempo, esta estructura es el sistema,
getsystem time(amp; time); // Llamada para obtener la API de hora del sistema.
sprintf(t_y, "d", time. wyear); //Envía el formato de año a la variable t_y.
sprintf(t_m, "d", hora. wmes);
sprintf(t_w, "d", hora. wdayofweek); , " d ", hora . wday);
sprintf(t_h, " d ", hora . whour);
sprintf(t_Min, " d ", hora . wminuto);
sprintf(t_s, " d ", tiempo . ws segundo
sprintf (t_Mi, " d ", tiempo . wmillsegundos); "s,s,s,s,s,s,s,s,s,s",
Hora.Año,
hora.wMes,
hora .wDayOfWeek,
tiempo.wDay,
tiempo.wHour,
tiempo .wm minutos,
tiempo .ws segundo,
tiempo . wmillsegundos);
}
/***
Los miembros de la estructura del sistema son los siguientes:
Estructura horaria del sistema
{
Palabra wAño año
WORD wMes luna
WORD wDayOfWeek semana, 0=Domingo, 1=lunes. ...
WORD wDía sol
Palabra wHora hora
WORD wMinuto minuto
WORD wSegundo segundo
WORD wMilisegundos milisegundos
}El tiempo del sistema finaliza
//***/