All Projects → alex023 → Clock

alex023 / Clock

Licence: apache-2.0
A low consumption, low latency support for frequent updates of large capcity timing manage

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Clock

timer.cljs
Scheduling async operations in Clojurescript
Stars: ✭ 22 (-86.34%)
Mutual labels:  clock, timer
Simple Clock
Combination of a beautiful clock with widget, alarm, stopwatch & timer, no ads
Stars: ✭ 257 (+59.63%)
Mutual labels:  timer, clock
cron-schedule
A zero-dependency cron parser and scheduler for Node.js, Deno and the browser.
Stars: ✭ 28 (-82.61%)
Mutual labels:  schedule, timer
tm
timers and timeline
Stars: ✭ 31 (-80.75%)
Mutual labels:  clock, timer
Use Timer
A timer hook for React
Stars: ✭ 113 (-29.81%)
Mutual labels:  timer, clock
vue-circular-count-down-timer
a count down timer library for vue.js
Stars: ✭ 45 (-72.05%)
Mutual labels:  clock, timer
Amazing Time Picker
Timepicker (Clock Picker) for Angular 2, Angular 4 and Angular 5, Angular 6, Angular 7 - Compatible with Angular Material
Stars: ✭ 142 (-11.8%)
Mutual labels:  timer, clock
new-clock
The best clock app there is
Stars: ✭ 24 (-85.09%)
Mutual labels:  clock, timer
Flip Clock
A flip clock, timer and countdown made with Polymer
Stars: ✭ 69 (-57.14%)
Mutual labels:  timer, clock
React Countdown
React Component showing a countdown to certain date and time.
Stars: ✭ 58 (-63.98%)
Mutual labels:  timer, clock
Clock
一个简单的计时器程序💡/A sample clock⏰
Stars: ✭ 15 (-90.68%)
Mutual labels:  clock, timer
Uicircularprogressring
A circular progress bar for iOS written in Swift
Stars: ✭ 1,658 (+929.81%)
Mutual labels:  timer, clock
croner
Trigger functions and/or evaluate cron expressions in JavaScript. No dependencies. Most features. All environments.
Stars: ✭ 169 (+4.97%)
Mutual labels:  schedule, timer
Aospdeskclock
Fork of aosp deskclock: alarm,clock, timer,stopwatch
Stars: ✭ 28 (-82.61%)
Mutual labels:  clock, timer
Hgcircularslider
A custom reusable circular / progress slider control for iOS application.
Stars: ✭ 2,240 (+1291.3%)
Mutual labels:  timer, clock
Peaclock
A responsive and customizable clock, timer, and stopwatch for the terminal.
Stars: ✭ 314 (+95.03%)
Mutual labels:  timer, clock
React Timer Hook
React timer hook
Stars: ✭ 118 (-26.71%)
Mutual labels:  timer, clock
Flipdown
⏰ A lightweight and performant flip styled countdown clock
Stars: ✭ 136 (-15.53%)
Mutual labels:  timer, clock
Awesome Kubernetes
A curated list for awesome kubernetes sources 🚢🎉
Stars: ✭ 12,306 (+7543.48%)
Mutual labels:  schedule
Schedule
Schedule is a package that helps tracking schedules for your models. If you have workers in a company, you can set schedules for them and see their availability though the time.
Stars: ✭ 155 (-3.73%)
Mutual labels:  schedule

Clock

License Go Report Card GoDoc Build Status

Brief

Timing task manager based on red black tree in memory

Feature

  • support task function call, and event notifications
  • support task that executes once or several times
  • support task cancel which added
  • fault isolation
  • 100k/s operation

last indicator may not be available on the cloud server,see more test code

Example

add a task that executes once

   var (
		myClock = NewClock()
		jobFunc  = func() {
			fmt.Println("schedule once")
		}
	)
	//add a task that executes once,interval 100 millisecond
	myClock.AddJobWithInterval(time.Duration(100*time.Millisecond), jobFunc)

	//wait a second,watching 
	time.Sleep(1 * time.Second)

	//Output:
	//
	//schedule once

add repeat task that executes three times

func ExampleClock_AddJobRepeat() {
	var (
   		myClock = NewClock()
   	)
   	//define a repeat task 
   	fn := func() {
   		fmt.Println("schedule repeat")
   	}
   	//add in clock,execute three times,interval 200 millisecond
   	_, inserted := myClock.AddJobRepeat(time.Duration(time.Millisecond*200), 3, fn)
   	if !inserted {
   		log.Println("failure")
   	}
    	//wait a second,watching 
   	time.Sleep(time.Second)
   	//Output:
   	//
   	//schedule repeat
   	//schedule repeat
   	//schedule repeat
}

rm a task before its execution

func ExampleClock_RmJob(){
   var (
   	myClock = NewClock()
   	count int
   	jobFunc = func() {
   		count++
   		fmt.Println("do ",count)
   	}
   )
   //创建任务,间隔1秒,执行两次
   job, _ := myClock.AddJobRepeat(time.Second*1,2, jobFunc)

   //任务执行前,撤销任务
   time.Sleep(time.Millisecond*500)
   job.Cancel()

   //等待3秒,正常情况下,事件不会再执行
   time.Sleep(3 * time.Second)

   //Output:
   //
   //
}

more examples

event notify

TTL Session

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].