Temporizar

package main

import (
	"time"
	"fmt"
)

func main() {
	startTime := time.Now()
	
	// Do something
	time.Sleep(3 *time.Second)

	endTime := time.Now()
	
  	// Subtract the end time from the start time and convert it into seconds
	elapsedTime := endTime.Sub(startTime).Seconds()
	
	fmt.Printf("It took %f seconds\n", elapsedTime)
}
Andrew Patton