������� �������, ���� � ��������������� �����
����������� ���������� C/C++ �������� ��� �������, ���������� � ����� � ��������, � ����� �������, �������������� ��������������� ����������, ��������� � ����������. ������ ���� �������� � ��������� ������ �����. � ����� � ������������� ������� ���� � ������� ������� ��������� ��������� <time.h>, � � ����� C++ � ��������� <ctime.h>. � ���� ����� ��� �������� ��������� ������������ ����� �-����������, �� ������ �� ��������� <time.h> � ��������������� ����� ����� �������� �������� �� ��������� <ctime.h>. � ��������� <time.h> ���������� ��� ���� ������, ��������� � ����������� �������: clock_t, time_t � tin. ���� clock_t � time_t ������������� ��� ������������� ���������� ������� � ���� � ���� ���������� ������ ��������, ����������� ����������� ��������. ��� ��������� tm �������� ���� � ����� � ���� ��������� �� ��������. ����, ��������� tm �������� ��������� �����. struct tm{ int tm_sec; //�������, 0-61 int tm_min; //������, 0-59 int tm_hour; //����, 0-23 int tm_mday; //���� ������, 1-31 int tm_non; //�����, ������� � ������, 0-11 int tm_year; //��� ����� 1900 int tm_wday; //����, ������� � �����������, 0-6 int tm_yday; //����, ������� � 1-�� ������, 0-365 int tm_isdst //��������� ������� ������� } �������� tm_isdst ������������, ���� ��������� ����� ������� �������(Daylight Saving Time), ����� ����, ���� �� ���������, � ������������, ���� ���������� �� ���� ����������. ����� ����, � ��������� <time.h> ��������� ������ CLOCKS_PER_SEC, ������� ������ ���������� ������� ��������� ����� � �������. ��� ������ � ��������� ��������������� ����� ���������� ������������ � ����� � ��������� <locale.h>, � � ����� C++ � ��������� <clocale.h>. � ���� ���������� ���������� ��������� lconv, ������� ��������� � �������� ������� localeconv(). ������ �������
asctime � ���������� ��������� �� ������, ������� �������� ���������� � ���� � ������� |
Нет комментариев. Оставить комментарий: |