Fixed createSession(): now uses nanoseconds