Post all your code. If currentMillis is to contain what it sounds like, it should be of type unsigned long and not int.