11 Transition() : mStart(0), mDuration(0), mNotStarted(
true) {}
14 uint8_t getProgress(uint32_t now) {
20 }
else if (now >= mStart + mDuration) {
23 return ((now - mStart) * 255) / mDuration;
27 void start(uint32_t now, uint32_t duration) {
37 bool isTransitioning(uint32_t now) {
41 return now >= mStart && now < mStart + mDuration;