1. Home
  2. /
  3. Go
  4. /
  5. Simple Timer

Simple Timer - Go Typing CST Test

Loading…

Simple Timer — Go Code

Counts seconds using goroutines and channels.

package main

import (
	"fmt"
	"time"
)

func main() {
	ticker := time.NewTicker(time.Second)
	defer ticker.Stop()

	count := 0
	for count < 3 {
		<-ticker.C
		count++
		fmt.Println("Time:", count, "sec")
	}
}

Go Language Guide

Go (Golang) is a statically typed, compiled programming language designed at Google. It emphasizes simplicity, concurrency, and high-performance networking and system programming, making it ideal for cloud services, web backends, and distributed systems.

Primary Use Cases

  • ▸Backend web services and APIs
  • ▸Cloud-native and distributed systems
  • ▸Command-line utilities
  • ▸Network programming and microservices
  • ▸DevOps and infrastructure tooling

Notable Features

  • ▸Compiled and statically typed with fast binaries
  • ▸Goroutines and channels for concurrency
  • ▸Automatic memory management via garbage collection
  • ▸Powerful standard library, especially for networking and web
  • ▸Cross-platform compilation support

Origin & Creator

Created by Robert Griesemer, Rob Pike, and Ken Thompson at Google in 2007 and publicly released in 2009.

Industrial Note

Go is specialized for backend systems, cloud infrastructure, networking, and concurrent applications rather than heavy GUI or mobile frontend development.

More Go Typing Exercises

Go Counter with GoroutinesGo Theme ToggleGo Score TrackerGo Health TrackerGo Level TrackerGo Coin CounterGo Ammo TrackerGo Star Collector

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher