Convert java to kotlin hangs


#1

I’m not sure if I’ve come to the right place to report this. If not, please accept my apologies and direct me to the proper forum. I downloaded a java project from http://www.therealjoshua.com/wp-content/uploads/2012/07/new-MVC.zip and attempted to translate it to kotlin. When I try to translate MainActivity.java, AndroidStudio just hangs. Translating it a bit at a time, I found that the code that seems to cause the problem is this:

private Runnable timerRun = new Runnable() {
@Override
public void run() {
if (isTimerRunning) {
long change = System.currentTimeMillis() - initTime;
initTime = System.currentTimeMillis();
model.setElapsedTime(model.getElapsedTime() + change); // controller is responsible for updating the model
handler.postDelayed(timerRun, 100);
}
}
};