V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
FoolgryWang
V2EX  ›  分享创造

一个毫秒时间级时间工具

  •  
  •   FoolgryWang · 351 天前 · 1957 次点击
    这是一个创建于 351 天前的主题,其中的信息可能已经有所发展或是发生改变。

    平时参与需要卡时间的一些活动,比如抢券,抢饿了么免单,需要看毫秒级时间,有一些在线工具,打开太慢了,搞一个本地的 HTML ,加入书签中,需要的时候直接打开使用。

    代码在链接里,复制之后保存为 HTML 使用浏览器打开就行

    <script src="https://gist.github.com/foolgry/e9f561b1ba39a785ee5d4163b13b9f11.js"></script>
    5 条回复    2023-12-10 20:26:18 +08:00
    FoolgryWang
        1
    FoolgryWang  
    OP
       351 天前
    效果如下
    shangyu7
        2
    shangyu7  
       351 天前
    @echo off
    for /F "tokens=1 delims=# " %%a in ('"prompt #$H# & echo on & for %%b in (1) do rem"') do set "BSPACE=%%a"

    echo|set /p="Time Now: "

    <nul set /p =%time%
    set dtime1=%time:~-2%

    :loop
    set dtime2=%time:~-2%
    if %dtime2% NEQ %dtime1% (
    <nul set /p =%BSPACE%%BSPACE%%BSPACE%%BSPACE%%BSPACE%%BSPACE%%BSPACE%%BSPACE%%BSPACE%%BSPACE%%BSPACE%
    <nul set /p =%time%
    set dtime1=%dtime2%
    )
    goto loop
    needpp
        3
    needpp  
       351 天前
    这是什么原理? 可能对方服务器不是基于标准时间怎么搞?
    meeop
        4
    meeop  
       350 天前   ❤️ 1
    帮你转换成 url 链接,点开就行,不依赖网络

    data:text/html;base64,CjwhRE9DVFlQRSBodG1sPgo8aHRtbD4KPGhlYWQ+CiAgICA8bWV0YSBjaGFyc2V0PSJ1dGYtOCIgLz4KCiAgICA8dGl0bGU+5YyX5Lqs5pe26Ze0PC90aXRsZT4KICAgIDxzdHlsZT4KICAgICAgICBib2R5IHsKICAgICAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgIGhlaWdodDogMTAwdmg7CiAgICAgICAgICAgIG1hcmdpbjogMDsKICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2YwZjBmMDsKICAgICAgICAgICAgZm9udC1mYW1pbHk6IEFyaWFsLCBzYW5zLXNlcmlmOwogICAgICAgIH0KCiAgICAgICAgI3RpbWUgewogICAgICAgICAgICBmb250LXNpemU6IDNlbTsKICAgICAgICAgICAgY29sb3I6ICMzMzM7CiAgICAgICAgICAgIHRleHQtYWxpZ246IGNlbnRlcjsKICAgICAgICB9CiAgICA8L3N0eWxlPgo8L2hlYWQ+Cjxib2R5PgogICAgPGRpdiBpZD0idGltZSI+PC9kaXY+CgogICAgPHNjcmlwdD4KICAgICAgICBjb25zdCB0aW1lRGl2ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3RpbWUnKQogICAgICAgIGZ1bmN0aW9uIHVwZGF0ZVRpbWUoKSB7CiAgICAgICAgICAgIHZhciBub3cgPSBuZXcgRGF0ZSgpOwogICAgICAgICAgICB2YXIgeWVhciA9IG5vdy5nZXRGdWxsWWVhcigpOwogICAgICAgICAgICB2YXIgbW9udGggPSBTdHJpbmcobm93LmdldE1vbnRoKCkgKyAxKS5wYWRTdGFydCgyLCAnMCcpOwogICAgICAgICAgICB2YXIgZGF5ID0gU3RyaW5nKG5vdy5nZXREYXRlKCkpLnBhZFN0YXJ0KDIsICcwJyk7CiAgICAgICAgICAgIHZhciBob3VyID0gU3RyaW5nKG5vdy5nZXRIb3VycygpKS5wYWRTdGFydCgyLCAnMCcpOwogICAgICAgICAgICB2YXIgbWludXRlID0gU3RyaW5nKG5vdy5nZXRNaW51dGVzKCkpLnBhZFN0YXJ0KDIsICcwJyk7CiAgICAgICAgICAgIHZhciBzZWNvbmQgPSBTdHJpbmcobm93LmdldFNlY29uZHMoKSkucGFkU3RhcnQoMiwgJzAnKTsKICAgICAgICAgICAgdmFyIG1pbGxpc2Vjb25kID0gU3RyaW5nKG5vdy5nZXRNaWxsaXNlY29uZHMoKSkucGFkU3RhcnQoMywgJzAnKTsKCiAgICAgICAgICAgIHZhciB0aW1lID0gYCR7eWVhcn0tJHttb250aH0tJHtkYXl9ICR7aG91cn06JHttaW51dGV9OiR7c2Vjb25kfS4ke21pbGxpc2Vjb25kfWA7CgogICAgICAgICAgICB0aW1lRGl2LmlubmVySFRNTCA9IHRpbWU7CgogICAgICAgICAgICByZXF1ZXN0QW5pbWF0aW9uRnJhbWUodXBkYXRlVGltZSk7CiAgICAgICAgfQoKICAgICAgICAvLyDmr4/mr6vnp5Lmm7TmlrDkuIDmrKHml7bpl7QKICAgICAgICByZXF1ZXN0QW5pbWF0aW9uRnJhbWUodXBkYXRlVGltZSk7CiAgICA8L3NjcmlwdD4KPC9ib2R5Pgo8L2h0bWw+CnZpZXcgcmF3dGltZS5odG1sIGhvc3RlZCB3aXRoIOKdpCBieSBHaXRIdWI=
    coolfan
        5
    coolfan  
       350 天前
    这样显示本机的时间不准吧,手头几个设备的本地时间基本都要差上 0.5s 以上了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2725 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 15:13 · PVG 23:13 · LAX 07:13 · JFK 10:13
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.