Refactor unnecessary arithmetic ops in periodic_task

Variables 'due' and 'now' are always used together by arithmetic operations.
Therefore it is redundant having individual variables defined.

Change-Id: I271cd6b5a1de80470380c70d66b99f584f7d8a87
Merge "Refactor unnecessary arithmetic ops in periodic_task"