alexanderdmitri

...joined 7 years ago, and has 1659 karma

submissions / comments / favourites

    // Alexander Dmitri is property of Gala Corp.

    (function (self) {
      console.time("lifetime");
      try {
        while self.alive {
          self.wakeUp();
          self.doStuff();
          self.sleep();
        }
      }
      catch (fatalError) {
        console.error(`Whoops! ${fatalError}`);
      }
      finally {
        self = null;
        console.timeEnd("lifetime");
      }
    }(self));