[VOL-2735]Durations should be specified as type time.Duration not int

Change-Id: I65a1e24af41fc748590c9422f68fc1fd88b1c72f
diff --git a/cmd/ofagent/config.go b/cmd/ofagent/config.go
index 9db89ea..33bda04 100644
--- a/cmd/ofagent/config.go
+++ b/cmd/ofagent/config.go
@@ -35,7 +35,7 @@
 	ConnectionRetryDelay      time.Duration
 	ConnectionMaxRetries      int
 	KVStoreType               string
-	KVStoreTimeout            int // in seconds
+	KVStoreTimeout            time.Duration
 	KVStoreHost               string
 	KVStorePort               int
 	InstanceID                string
@@ -119,7 +119,7 @@
 		"interval between attempts to synchronize devices from voltha to ofagent")
 	flag.StringVar(&(config.KVStoreType), "kv_store_type", "etcd", "KV store type")
 
-	flag.IntVar(&(config.KVStoreTimeout), "kv_store_request_timeout", 5, "The default timeout when making a kv store request")
+	flag.DurationVar(&(config.KVStoreTimeout), "kv_store_request_timeout", 5*time.Second, "The default timeout when making a kv store request")
 
 	flag.StringVar(&(config.KVStoreHost), "kv_store_host", "voltha-etcd-cluster-client.voltha.svc.cluster.local", "KV store host")
 
diff --git a/cmd/ofagent/main.go b/cmd/ofagent/main.go
index 991a221..987a8e6 100644
--- a/cmd/ofagent/main.go
+++ b/cmd/ofagent/main.go
@@ -28,6 +28,7 @@
 	"github.com/opencord/voltha-lib-go/v3/pkg/version"
 	"os"
 	"strconv"
+	"time"
 )
 
 func printBanner() {
@@ -44,8 +45,9 @@
 	fmt.Println(version.VersionInfo.String("  "))
 }
 
-func setLogConfig(ctx context.Context, kvStoreHost, kvStoreType string, kvStorePort, kvStoreTimeout int) (kvstore.Client, error) {
+func setLogConfig(ctx context.Context, kvStoreHost, kvStoreType string, kvStorePort int, kvStoreTimeout time.Duration) (kvstore.Client, error) {
 	client, err := kvstore.NewEtcdClient(kvStoreHost+":"+strconv.Itoa(kvStorePort), kvStoreTimeout, log.WarnLevel)
+
 	if err != nil {
 		return nil, err
 	}