Fix segfault due to local variables in gc; add Time library with millis() function