Skip to main content

A timer for python code

Project description

import timer1101 as timer

if __name__ == "__main__":
    timer.starte("test0")
    # some codes
    timer.starte("test1")
    # some codes
    timer.stope("test0")
    # some codes
    timer.stope("test1")
import timer1101 as timer
import logging
import coloredlogs
import verboselogs


verboselogs.install()
coloredlogs.install(level=logging.INFO)
logger = logging.getLogger("timeLogger")
timer.rootTimer.outputfunc = logger.info

if __name__ == "__main__":
    timer.starte("test")
    # some codes
    timer.stope("test")
from timer1101 import timefunc


@timefunc()
def func(l):
    for i in range(l):
        print(i)
    return l


if __name__ == "__main__":
    ret = func(10)
    print(ret)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timer1101-0.0.2.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

timer1101-0.0.2-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file timer1101-0.0.2.tar.gz.

File metadata

  • Download URL: timer1101-0.0.2.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.10

File hashes

Hashes for timer1101-0.0.2.tar.gz
Algorithm Hash digest
SHA256 bcb8824bd501e87b8a98d2141c2846d2b919274f536113c2be413997465b4041
MD5 69b74fcbea394dbf9ee8541bb9104d19
BLAKE2b-256 1f1fbdc445923411473f2942cff900af669dc1c05f0d257242a31f70ff5f8470

See more details on using hashes here.

File details

Details for the file timer1101-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: timer1101-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.10

File hashes

Hashes for timer1101-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6ef826ed60f0b9638b5977f1851ad0bb506495c1d7ebb6b0f78424d4c5123e22
MD5 51c1ffd3394486e57aa3cc823e767c6d
BLAKE2b-256 3e7f1504cde06fc8279272a7217fd77a3ff5e6560bcb710adea076da189601f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page