Simulator - how would I make suggestions?

I'm not sure if this is the right place to ask...

I want to suggest a new feature for the simulator - it would be great to be able to quickly set the time, and even better if it could advance the time quickly, say 1 minute every 5 or so seconds. It would make testing watch faces a lot easier.

I'm only starting out so i I don't have well worn and trusted techniques under my belt, I'm guessing the more seasoned developers wouldn't find the function as useful.
  • You should be able to use a timer and then fake the time. Something like this...

    var timer;
    var seconds = 0;

    function onEnterSleep() {
    if (timer != null) {
    timer.stop();
    timer = null;
    }
    }

    function onExitSleep() {
    if (timer == null) {
    timer = new Timer.Timer();
    timer.start(new Lang.Method(Ui, :requestUpdate), 200, true);
    }
    }

    function onUpdate(dc) {
    var now = Sys.getClockTime();

    // fake the time
    seconds += 1;
    now.hour = (seconds / 3600) % 24;
    now.min = (seconds / 60) % 60;
    now.sec = (seconds % 60);
    // fake the time

    // your normal code
    }
  • I agree that for testing purposes it would be useful to set the time within the sim. You can do this outside the sim by adjusting the OS clock, and then launching your app. Not the most convenient, but it's a technique that can be used to test clock-based transitions (e.g. AM-to-PM switch, backgrounds that change depending on the time of day, etc.).

    I should add that I have a request open to provide this kind of support, so it may be available in a future release of the simulator.