Skip to main content

No project description provided

Project description

ChronoKit

A stopwatch/timer utillity

Installation

pip install ticktools

Importing

from chronokit import *

Usage

stopwatch

start()

The function start() in the class stopwatch takes no arguments. It starts the stopwatch.

stopwatch.start()

stop()

The function stop() in the class stopwatch takes no arguments. It stops the stopwatch.

stopwatch.stop()

resume()

The function resume() in the class stopwatch takes no arguments. It resumes the timer once it was stopped.

stopwatch.resume()

lap()

The function lap() in the class stopwatch takes no arguments. It makes a lap.

stopwatch.lap()

returntime()

The function returntime() in the class stopwatch takes no arguments. It returns the time the stopwatch has run.

time = stopwatch.returntime()

returnlaps()

The function returnlaps() in the class stopwatch takes no arguments. It returns the laps in list format.

laps = stopwatch.returnlaps()

reset()

The function reset() in the class stopwatch takes no arguments. It resets the stopwatch.

stopwatch.start()
wait(2000)
stopwatch.reset() #Works even when stopwatch is running
wait(1000)
stopwatch.stop()
stopwatch.reset() #Also works when stopwatch has been stopped

wait()

The function wait() takes one argument: the amout of time to wait in milliseconds.

wait(1000)

from_start()

The function from_start() doesn't take any arguments. When you call the function, it returns the time elapsed since the module was imported

from_start()

deadline()

The function deadline takes two arguments: The amount of time it should run in milliseconds and the function it should run.

deadline(3000, lambda elapsed: print(elapsed)) #The function MUST have an argument called 'elapsed'

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

ticktools-1.2.2.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

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

ticktools-1.2.2-py3-none-any.whl (1.6 kB view details)

Uploaded Python 3

File details

Details for the file ticktools-1.2.2.tar.gz.

File metadata

  • Download URL: ticktools-1.2.2.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for ticktools-1.2.2.tar.gz
Algorithm Hash digest
SHA256 8c70368f06937e9b2365818c74a49e373c39ee9b66a58ef307fcd88af7a4756e
MD5 0251c4689a8a7ef494b5b7e794263058
BLAKE2b-256 143ca48bb4512d3da2b009665f1eaf714f6e41ef3926530bc480e01d604c3a6d

See more details on using hashes here.

File details

Details for the file ticktools-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: ticktools-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 1.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for ticktools-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0722152dacb7ee92d5bac3550ac057905c152ffc14dad3b43c2dd1e9c23dad87
MD5 cc39b5b6aff823eaecb90c0bc4139632
BLAKE2b-256 b52d044c49a1120a3cfcf531649126cab79721f4222f8df5a08347cfcd46655d

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