Skip to content

Commit

Permalink
Merge pull request #3 from PhirePhly/master
Browse files Browse the repository at this point in the history
Unify data type for time variables
  • Loading branch information
witnessmenow authored Mar 6, 2017
2 parents 18eee39 + bdb1c6d commit ee9eb09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/ESP8266/ChannelStatistics/ChannelStatistics.ino
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ char password[] = "yyyy"; // your network key
WiFiClientSecure client;
YoutubeApi api(API_KEY, client);

int api_mtbs = 60000; //mean time between api requests
long api_lasttime; //last time api request has been done
unsigned long api_mtbs = 60000; //mean time between api requests
unsigned long api_lasttime; //last time api request has been done

long subs = 0;

Expand Down Expand Up @@ -57,7 +57,7 @@ void setup() {

void loop() {

if (millis() > api_lasttime + api_mtbs) {
if (millis() - api_lasttime > api_mtbs) {
if(api.getChannelStatistics(CHANNEL_ID))
{
Serial.println("---------Stats---------");
Expand Down

0 comments on commit ee9eb09

Please sign in to comment.