package main

import (
	"fmt"
	"time"
)

func logger(s string) func() {
	fmt.Printf("Enter in %s\n",s)
	now := time.Now()
	return func () {
		fmt.Printf("Time elapsed %s\n",time.Since(now))
		fmt.Printf("Exit from func %s\n",s)
	}
}

func SlowOP() {
	defer logger("SlowOP")()
	time.Sleep(2*time.Second)
}
	
func main() {
	SlowOP()	
}
