mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-11-03 20:12:25 -06:00 
			
		
		
		
	* update codeberg.org/gruf/ libraries Signed-off-by: kim <grufwub@gmail.com> * another update Signed-off-by: kim <grufwub@gmail.com>
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			312 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			312 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package logger
 | 
						|
 | 
						|
import (
 | 
						|
	"sync"
 | 
						|
	"time"
 | 
						|
 | 
						|
	"codeberg.org/gruf/go-nowish"
 | 
						|
)
 | 
						|
 | 
						|
var (
 | 
						|
	clock     = nowish.Clock{}
 | 
						|
	clockOnce = sync.Once{}
 | 
						|
)
 | 
						|
 | 
						|
// startClock starts the global nowish clock.
 | 
						|
func startClock() {
 | 
						|
	clockOnce.Do(func() {
 | 
						|
		clock.Start(time.Millisecond * 100)
 | 
						|
		clock.SetFormat("2006-01-02 15:04:05")
 | 
						|
	})
 | 
						|
}
 |