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.
1 parent 5cb2b8a commit 181311bCopy full SHA for 181311b
examples/tests/performance/sine/sine.ino
@@ -8,12 +8,12 @@ int sec = 5;
8
9
size_t measure(int sec, SoundGenerator<int16_t> *gen){
10
uint64_t end = millis()+(1000*sec);
11
- size_t count;
+ size_t count = 0;
12
while(millis()<end){
13
int16_t s = gen->readSample();
14
count++;
15
}
16
- return count;
+ return count / sec;
17
18
19
const char* resultStr(const char* name, size_t count){
@@ -24,7 +24,7 @@ const char* resultStr(const char* name, size_t count){
24
25
void setup(){
26
Serial.begin(115200);
27
- Serial.print("Number of calls in ");
+ Serial.print("Number of samples per sec during ");
28
Serial.print(sec);
29
Serial.println(" seconds:");
30
0 commit comments