Photon Power Management

I was also looking to sleep for less than a second to save some power.

(Sleeping for less than a second)

There is no official support in particle.

So I came up with this

void msSleep(unsigned long ms) {
   unsigned long start = millis();
   while(millis() - start <  ms) {
      __WFI();
   }
}

which save some milli amps, but I do not know if it has some side effects for the rest of the system.