Initial source code
[oam/tr069-adapter.git] / common / src / main / java / org / commscope / tr069adapter / common / scheduler / TimeUnit.java
diff --git a/common/src/main/java/org/commscope/tr069adapter/common/scheduler/TimeUnit.java b/common/src/main/java/org/commscope/tr069adapter/common/scheduler/TimeUnit.java
new file mode 100644 (file)
index 0000000..d549820
--- /dev/null
@@ -0,0 +1,38 @@
+/*\r
+ * ============LICENSE_START========================================================================\r
+ * ONAP : tr-069-adapter\r
+ * =================================================================================================\r
+ * Copyright (C) 2020 CommScope Inc Intellectual Property.\r
+ * =================================================================================================\r
+ * This tr-069-adapter software file is distributed by CommScope Inc under the Apache License,\r
+ * Version 2.0 (the "License"); you may not use this file except in compliance with the License. You\r
+ * may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\r
+ * either express or implied. See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * ===============LICENSE_END=======================================================================\r
+ */\r
+\r
+\r
+package org.commscope.tr069adapter.common.scheduler;\r
+\r
+public enum TimeUnit {\r
+  SECONDS(1000), MINUTES(60 * 1000L), HOURS(60 * 60 * 1000L), DAYS, MILLISECONDS(1);\r
+\r
+  long timeInMillis;\r
+\r
+  private TimeUnit() {\r
+\r
+  }\r
+\r
+  private TimeUnit(long timeInMillis) {\r
+    this.timeInMillis = timeInMillis;\r
+  }\r
+\r
+  public long getMilliSeconds() {\r
+    return timeInMillis;\r
+  }\r
+}\r