We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 18eee39 + bdb1c6d commit ee9eb09Copy full SHA for ee9eb09
examples/ESP8266/ChannelStatistics/ChannelStatistics.ino
@@ -23,8 +23,8 @@ char password[] = "yyyy"; // your network key
23
WiFiClientSecure client;
24
YoutubeApi api(API_KEY, client);
25
26
-int api_mtbs = 60000; //mean time between api requests
27
-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
28
29
long subs = 0;
30
@@ -57,7 +57,7 @@ void setup() {
57
58
void loop() {
59
60
- if (millis() > api_lasttime + api_mtbs) {
+ if (millis() - api_lasttime > api_mtbs) {
61
if(api.getChannelStatistics(CHANNEL_ID))
62
{
63
Serial.println("---------Stats---------");
0 commit comments