Update Demo2.scala

Take the time in milliseconds and truncate it to seconds. Then, create a number that cycles from 0 to 9, changing every second.