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

Change-Id: Id1dbecc231b0708334723decbc943a57a60d8f1d
diff --git a/internal/pkg/resourcemanager/resourcemanager.go b/internal/pkg/resourcemanager/resourcemanager.go
index a7f7730..8f6271d 100755
--- a/internal/pkg/resourcemanager/resourcemanager.go
+++ b/internal/pkg/resourcemanager/resourcemanager.go
@@ -26,6 +26,7 @@
 	"strconv"
 	"strings"
 	"sync"
+	"time"
 
 	"github.com/opencord/voltha-lib-go/v3/pkg/db"
 	"github.com/opencord/voltha-lib-go/v3/pkg/db/kvstore"
@@ -37,7 +38,7 @@
 
 const (
 	// KvstoreTimeout specifies the time out for KV Store Connection
-	KvstoreTimeout = 5
+	KvstoreTimeout = 5 * time.Second
 	// BasePathKvStore - service/voltha/openolt/<device_id>
 	BasePathKvStore = "service/voltha/openolt/{%s}"
 	// TpIDPathSuffix - <(pon_id, onu_id, uni_id)>/tp_id
@@ -124,13 +125,13 @@
 	flowIDToGemInfoLock sync.RWMutex
 }
 
-func newKVClient(storeType string, address string, timeout uint32) (kvstore.Client, error) {
+func newKVClient(storeType string, address string, timeout time.Duration) (kvstore.Client, error) {
 	logger.Infow("kv-store-type", log.Fields{"store": storeType})
 	switch storeType {
 	case "consul":
-		return kvstore.NewConsulClient(address, int(timeout))
+		return kvstore.NewConsulClient(address, timeout)
 	case "etcd":
-		return kvstore.NewEtcdClient(address, int(timeout), log.FatalLevel)
+		return kvstore.NewEtcdClient(address, timeout, log.FatalLevel)
 	}
 	return nil, errors.New("unsupported-kv-store")
 }