Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
timer stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
fulton committed Jan 11, 2020
1 parent b0bba97 commit 6d3f0c7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/com/andromeda/araserver/skills/Timer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ class Timer {
term = pairs[0]
val words = SortWords(keyWord = keyWord, mainVal = term).getComplexDate(graph)
println(words)
var numOfUnits:Int?
var unit:String?
var numOfUnits:Int? = null
var unit:String? = null
for(i in words){
if(i.type == "CD") numOfUnits = i.word.toInt()
else unit = i.word
}
val map = mapOf("minutes" to 60 * 1000, "minute" to 60 * 1000, "hours" to 60 * 60 * 1000, "hour" to 60 * 60 * 1000, "second" to 1000, "seconds" to 1000)
val time = numOfUnits?.times(map[unit]!!)
return ""
}
}

0 comments on commit 6d3f0c7

Please sign in to comment.