golang.org rate limiter:
rl := rate.NewLimiter(1000000, 1)
last := time.Now()
for i := 0; i < 10; i++ {
rl.Wait(context.Background())
cur := time.Now()
fmt.Println("last", cur.Sub(last))
last = cur
golang.org rate limiter:
rl := rate.NewLimiter(1000000, 1)
last := time.Now()
for i := 0; i < 10; i++ {
rl.Wait(context.Background())
cur := time.Now()
fmt.Println("last", cur.Sub(last))
last = cur
// ==UserScript== | |
// @name Remove WOA Watermark | |
// @version 0.1 | |
// @author yelo <zhihuzeye@gmail.com> | |
// @match *://km.woa.com/** | |
// @match *://csig.lexiangla.com/** | |
// @match *://mk.woa.com/** | |
// @match *://iwiki.woa.com/** | |
// @match *://qcloud.oa.com/** | |
// @match *://ieop.oa.com/** |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.