Skip to main content

bdtime简介

bode’s time model.

安装

  • pip install bdtime

案例

from bd_time import Time()
tt = Time()
tt.now(1)  # 输出当前运行的时间
tt.during(10)  # 检测运行时间是否在10秒内
tt.get_key_state('a')  # 检测'a'键是否按下
tt.stop('alt + a')      # 如果按下[Alt + a]键就推出

# 测试函数用, [2秒后]运行函数
@tt.run_f_with_sleep(2)
def f():
    ret = 'haha'
    return ret
print(f())

# 测试函数用, [5秒内]循环运行函数, 运行间隔为[1秒]
@tt.run_f_with_during((during_time=5, sleep_time=1)
def f():
    return keyboard.is_pressed('a') #-> True
f()

Release files for bdtime 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bdtime 1.0.6
File Size Uploaded
bdtime-1.0.6.tar.gz 8.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bdtime 1.0.6
File Interpreter ABI Platform
bdtime-1.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 21.0 kB

Release files / bdtime-1.0.6.tar.gz

Download URL bdtime-1.0.6.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
500ee40db31af1425829792cf642740f704f2370d97a8c827b4ac639dcdab9fd
BLAKE2b-256 checksum
How to use checksums
1eb4fb9679196ac26f1f534c22e16f9b35b4012f47c9909ebc884310f3c35346
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.12

Release files / bdtime-1.0.6-py3-none-any.whl

Download URL bdtime-1.0.6-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49dcd419e3df77915223dcacd88f63273db7a3f12f3c12837e1d129c95d58c45
BLAKE2b-256 checksum
How to use checksums
d4245345531d48ce84e77f0709ada222288a8c922a3e75e8bfdbb944fa666349
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.12

Release history Release notifications | RSS feed

This release

1.0.6 This release

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page