script: count the pressed time of clicking power button

This script is used to check the the pressed time of clikcing power
button on Intel moorefield platform.