【文件属性】:
文件名称:suru:Nim中的tqdm风格进度栏
文件大小:13.78MB
文件格式:ZIP
更新时间:2021-03-17 21:37:34
nim progress-bar progressbar nim-language nim-lang
苏鲁
Nim中的tqdm风格进度栏
上面的演示使用以下代码:
import unittest, os, sequtils, random
randomize ()
test "random time test" :
for a in suru ( toSeq ( 0 ..< 100 )) :
sleep (( rand ( 99 ) + 1 ))
test "long time test" :
for a in suru ([ 1 , 2 , 3 , 5 ]) :
sleep ( 1000 )
test "alternate long time test" :
sleep 1000
var bar: SuruBar = initSuruBar ( 25 )
bar. start ( 4 )
for a in toSeq ( 1 .. 1000 )
【文件预览】:
suru-master
----demo.gif(14.58MB)
----tests()
--------config.nims(36B)
--------tests.nim(3KB)
----LICENSE(1KB)
----src()
--------suru.nim(14KB)
----README.md(2KB)
----suru.nimble(199B)