Run Code  | Code Wall  | Users  | Misc  | Feedback  | About  | Login  | Theme  | Privacy 

Throttle Example in C++ (80 requests every 2 seconds)

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 1.03 sec, absolute running time: 8.06 sec, cpu time: 0 sec, memory peak: 3 Mb, absolute service time: 9.23 sec 
fork mode |  history  | discussion
Error(s):
Size of Queue = 400
Time : 1416638366914
Fetched value :1
Fetched value :2
Fetched value :3
Fetched value :4
Fetched value :5
Fetched value :6
Fetched value :7
Fetched value :8
Fetched value :9
Fetched value :10
Fetched value :11
Fetched value :12
Fetched value :13
Fetched value :14
Fetched value :15
Fetched value :16
Fetched value :17
Fetched value :18
Fetched value :19
Fetched value :20
Fetched value :21
Fetched value :22
Fetched value :23
Fetched value :24
Fetched value :25
Fetched value :26
Fetched value :27
Fetched value :28
Fetched value :29
Fetched value :30
Fetched value :31
Fetched value :32
Fetched value :33
Fetched value :34
Fetched value :35
Fetched value :36
Fetched value :37
Fetched value :38
Fetched value :39
Fetched value :40
Fetched value :41
Fetched value :42
Fetched value :43
Fetched value :44
Fetched value :45
Fetched value :46
Fetched value :47
Fetched value :48
Fetched value :49
Fetched value :50
Fetched value :51
Fetched value :52
Fetched value :53
Fetched value :54
Fetched value :55
Fetched value :56
Fetched value :57
Fetched value :58
Fetched value :59
Fetched value :60
Fetched value :61
Fetched value :62
Fetched value :63
Fetched value :64
Fetched value :65
Fetched value :66
Fetched value :67
Fetched value :68
Fetched value :69
Fetched value :70
Fetched value :71
Fetched value :72
Fetched value :73
Fetched value :74
Fetched value :75
Fetched value :76
Fetched value :77
Fetched value :78
Fetched value :79
Fetched value :80
Time Left = 2000
Fetching next set !!
Time : 1416638368914
Fetched value :81
Fetched value :82
Fetched value :83
Fetched value :84
Fetched value :85
Fetched value :86
Fetched value :87
Fetched value :88
Fetched value :89
Fetched value :90
Fetched value :91
Fetched value :92
Fetched value :93
Fetched value :94
Fetched value :95
Fetched value :96
Fetched value :97
Fetched value :98
Fetched value :99
Fetched value :100
Fetched value :101
Fetched value :102
Fetched value :103
Fetched value :104
Fetched value :105
Fetched value :106
Fetched value :107
Fetched value :108
Fetched value :109
Fetched value :110
Fetched value :111
Fetched value :112
Fetched value :113
Fetched value :114
Fetched value :115
Fetched value :116
Fetched value :117
Fetched value :118
Fetched value :119
Fetched value :120
Fetched value :121
Fetched value :122
Fetched value :123
Fetched value :124
Fetched value :125
Fetched value :126
Fetched value :127
Fetched value :128
Fetched value :129
Fetched value :130
Fetched value :131
Fetched value :132
Fetched value :133
Fetched value :134
Fetched value :135
Fetched value :136
Fetched value :137
Fetched value :138
Fetched value :139
Fetched value :140
Fetched value :141
Fetched value :142
Fetched value :143
Fetched value :144
Fetched value :145
Fetched value :146
Fetched value :147
Fetched value :148
Fetched value :149
Fetched value :150
Fetched value :151
Fetched value :152
Fetched value :153
Fetched value :154
Fetched value :155
Fetched value :156
Fetched value :157
Fetched value :158
Fetched value :159
Fetched value :160
Time Left = 2000
Fetching next set !!
Time : 1416638370914
Fetched value :161
Fetched value :162
Fetched value :163
Fetched value :164
Fetched value :165
Fetched value :166
Fetched value :167
Fetched value :168
Fetched value :169
Fetched value :170
Fetched value :171
Fetched value :172
Fetched value :173
Fetched value :174
Fetched value :175
Fetched value :176
Fetched value :177
Fetched value :178
Fetched value :179
Fetched value :180
Fetched value :181
Fetched value :182
Fetched value :183
Fetched value :184
Fetched value :185
Fetched value :186
Fetched value :187
Fetched value :188
Fetched value :189
Fetched value :190
Fetched value :191
Fetched value :192
Fetched value :193
Fetched value :194
Fetched value :195
Fetched value :196
Fetched value :197
Fetched value :198
Fetched value :199
Fetched value :200
Fetched value :201
Fetched value :202
Fetched value :203
Fetched value :204
Fetched value :205
Fetched value :206
Fetched value :207
Fetched value :208
Fetched value :209
Fetched value :210
Fetched value :211
Fetched value :212
Fetched value :213
Fetched value :214
Fetched value :215
Fetched value :216
Fetched value :217
Fetched value :218
Fetched value :219
Fetched value :220
Fetched value :221
Fetched value :222
Fetched value :223
Fetched value :224
Fetched value :225
Fetched value :226
Fetched value :227
Fetched value :228
Fetched value :229
Fetched value :230
Fetched value :231
Fetched value :232
Fetched value :233
Fetched value :234
Fetched value :235
Fetched value :236
Fetched value :237
Fetched value :238
Fetched value :239
Fetched value :240
Time Left = 2000
Fetching next set !!
Time : 1416638372915
Fetched value :241
Fetched value :242
Fetched value :243
Fetched value :244
Fetched value :245
Fetched value :246
Fetched value :247
Fetched value :248
Fetched value :249
Fetched value :250
Fetched value :251
Fetched value :252
Fetched value :253
Fetched value :254
Fetched value :255
Fetched value :256
Fetched value :257
Fetched value :258
Fetched value :259
Fetched value :260
Fetched value :261
Fetched value :262
Fetched value :263
Fetched value :264
Fetched value :265
Fetched value :266
Fetched value :267
Fetched value :268
Fetched value :269
Fetched value :270
Fetched value :271
Fetched value :272
Fetched value :273
Fetched value :274
Fetched value :275
Fetched value :276
Fetched value :277
Fetched value :278
Fetched value :279
Fetched value :280
Fetched value :281
Fetched value :282
Fetched value :283
Fetched value :284
Fetched value :285
Fetched value :286
Fetched value :287
Fetched value :288
Fetched value :289
Fetched value :290
Fetched value :291
Fetched value :292
Fetched value :293
Fetched value :294
Fetched value :295
Fetched value :296
Fetched value :297
Fetched value :298
Fetched value :299
Fetched value :300
Fetched value :301
Fetched value :302
Fetched value :303
Fetched value :304
Fetched value :305
Fetched value :306
Fetched value :307
Fetched value :308
Fetched value :309
Fetched value :310
Fetched value :311
Fetched value :312
Fetched value :313
Fetched value :314
Fetched value :315
Fetched value :316
Fetched value :317
Fetched value :318
Fetched value :319
Fetched value :320
Time Left = 1999
Fetching next set !!
Time : 1416638374915
Fetched value :321
Fetched value :322
Fetched value :323
Fetched value :324
Fetched value :325
Fetched value :326
Fetched value :327
Fetched value :328
Fetched value :329
Fetched value :330
Fetched value :331
Fetched value :332
Fetched value :333
Fetched value :334
Fetched value :335
Fetched value :336
Fetched value :337
Fetched value :338
Fetched value :339
Fetched value :340
Fetched value :341
Fetched value :342
Fetched value :343
Fetched value :344
Fetched value :345
Fetched value :346
Fetched value :347
Fetched value :348
Fetched value :349
Fetched value :350
Fetched value :351
Fetched value :352
Fetched value :353
Fetched value :354
Fetched value :355
Fetched value :356
Fetched value :357
Fetched value :358
Fetched value :359
Fetched value :360
Fetched value :361
Fetched value :362
Fetched value :363
Fetched value :364
Fetched value :365
Fetched value :366
Fetched value :367
Fetched value :368
Fetched value :369
Fetched value :370
Fetched value :371
Fetched value :372
Fetched value :373
Fetched value :374
Fetched value :375
Fetched value :376
Fetched value :377
Fetched value :378
Fetched value :379
Fetched value :380
Fetched value :381
Fetched value :382
Fetched value :383
Fetched value :384
Fetched value :385
Fetched value :386
Fetched value :387
Fetched value :388
Fetched value :389
Fetched value :390
Fetched value :391
Fetched value :392
Fetched value :393
Fetched value :394
Fetched value :395
Fetched value :396
Fetched value :397
Fetched value :398
Fetched value :399
Fetched value :400
Done with fetching all values !!