Pelokalan
Python ID
id en
Masuk
Proyek
library__time.po Berkas proyek · python-docs-id-3.14 · Bahasa Indonesia
Modul PO Hanya lihat
Teks sumber — English
Terjemahan — Bahasa Indonesia
This module provides various time-related functions. For related functionality, see also the :mod:`datetime` and :mod:`calendar` modules.
Although this module is always available, not all functions are available on all platforms. Most of the functions defined in this module call platform C library functions with the same name. It may sometimes be helpful to consult the platform documentation, because the semantics of these functions varies among platforms.
The functions in this module may not handle dates and times before the epoch_ or far in the future. The cut-off point in the future is determined by the C library; for 32-bit systems, it is typically in 2038.
The precision of the various real-time functions may be less than suggested by the units in which their value or argument is expressed. E.g. on most Unix systems, the clock "ticks" only 50 or 100 times a second.
Use the following functions to convert between time representations:
Functions
Fungsi-Fungsi
Get information on the specified clock as a namespace object. Supported clock names and the corresponding functions to read their value are:
:func:`localtime` may raise :exc:`OverflowError`, if the timestamp is outside the range of values supported by the platform C :c:func:`localtime` or :c:func:`gmtime` functions, and :exc:`OSError` on :c:func:`localtime` or :c:func:`gmtime` failure. It's common for this to be restricted to years between 1970 and 2038.
On Unix, the ``clock_nanosleep()`` and ``nanosleep()`` functions are now used if available. On Windows, a waitable timer is now used.
Although in many cases, changing the :envvar:`TZ` environment variable may affect the output of functions like :func:`localtime` without calling :func:`tzset`, this behavior should not be relied on.
General calendar-related functions. :func:`~calendar.timegm` is the inverse of :func:`gmtime` from this module.