Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bdtime

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bdtime

bode's private time model.

  • 1.0.6
  • PyPI
  • Socket score

Maintainers
1

bdtime简介

..

bode's time model.

安装

  • pip install bdtime

案例

.. code-block::

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()

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc