How to use Time method in argos

Best JavaScript code snippet using argos

USD2EUR.js

Source:USD2EUR.js Github

copy

Full Screen

1Ext.define('KitchenSink.store.USD2EUR', {2 alias: 'store.USD2EUR',3 extend: 'Ext.data.Store',4 model: 'KitchenSink.model.USD2EUR',5 storeId: 'USD2EUR',6 data: [7 {"time": 1136073600000, "value": 0.8446},8 {"time": 1136160000000, "value": 0.8445},9 {"time": 1136246400000, "value": 0.8444},10 {"time": 1136332800000, "value": 0.8451},11 {"time": 1136419200000, "value": 0.8418},12 {"time": 1136505600000, "value": 0.8264},13 {"time": 1136592000000, "value": 0.8258},14 {"time": 1136678400000, "value": 0.8232},15 {"time": 1136764800000, "value": 0.8233},16 {"time": 1136851200000, "value": 0.8258},17 {"time": 1136937600000, "value": 0.8283},18 {"time": 1137024000000, "value": 0.8278},19 {"time": 1137110400000, "value": 0.8256},20 {"time": 1137196800000, "value": 0.8292},21 {"time": 1137283200000, "value": 0.8239},22 {"time": 1137369600000, "value": 0.8239},23 {"time": 1137456000000, "value": 0.8245},24 {"time": 1137542400000, "value": 0.8265},25 {"time": 1137628800000, "value": 0.8261},26 {"time": 1137715200000, "value": 0.8269},27 {"time": 1137801600000, "value": 0.8273},28 {"time": 1137888000000, "value": 0.8244},29 {"time": 1137974400000, "value": 0.8244},30 {"time": 1138060800000, "value": 0.8172},31 {"time": 1138147200000, "value": 0.8139},32 {"time": 1138233600000, "value": 0.8146},33 {"time": 1138320000000, "value": 0.8164},34 {"time": 1138406400000, "value": 0.82},35 {"time": 1138492800000, "value": 0.8269},36 {"time": 1138579200000, "value": 0.8269},37 {"time": 1138665600000, "value": 0.8269},38 {"time": 1138752000000, "value": 0.8258},39 {"time": 1138838400000, "value": 0.8247},40 {"time": 1138924800000, "value": 0.8286},41 {"time": 1139011200000, "value": 0.8289},42 {"time": 1139097600000, "value": 0.8316},43 {"time": 1139184000000, "value": 0.832},44 {"time": 1139270400000, "value": 0.8333},45 {"time": 1139356800000, "value": 0.8352},46 {"time": 1139443200000, "value": 0.8357},47 {"time": 1139529600000, "value": 0.8355},48 {"time": 1139616000000, "value": 0.8354},49 {"time": 1139702400000, "value": 0.8403},50 {"time": 1139788800000, "value": 0.8403},51 {"time": 1139875200000, "value": 0.8406},52 {"time": 1139961600000, "value": 0.8403},53 {"time": 1140048000000, "value": 0.8396},54 {"time": 1140134400000, "value": 0.8418},55 {"time": 1140220800000, "value": 0.8409},56 {"time": 1140307200000, "value": 0.8384},57 {"time": 1140393600000, "value": 0.8386},58 {"time": 1140480000000, "value": 0.8372},59 {"time": 1140566400000, "value": 0.839},60 {"time": 1140652800000, "value": 0.84},61 {"time": 1140739200000, "value": 0.8389},62 {"time": 1140825600000, "value": 0.84},63 {"time": 1140912000000, "value": 0.8423},64 {"time": 1140998400000, "value": 0.8423},65 {"time": 1141084800000, "value": 0.8435},66 {"time": 1141171200000, "value": 0.8422},67 {"time": 1141257600000, "value": 0.838},68 {"time": 1141344000000, "value": 0.8373},69 {"time": 1141430400000, "value": 0.8316},70 {"time": 1141516800000, "value": 0.8303},71 {"time": 1141603200000, "value": 0.8303},72 {"time": 1141689600000, "value": 0.8302},73 {"time": 1141776000000, "value": 0.8369},74 {"time": 1141862400000, "value": 0.84},75 {"time": 1141948800000, "value": 0.8385},76 {"time": 1142035200000, "value": 0.84},77 {"time": 1142121600000, "value": 0.8401},78 {"time": 1142208000000, "value": 0.8402},79 {"time": 1142294400000, "value": 0.8381},80 {"time": 1142380800000, "value": 0.8351},81 {"time": 1142467200000, "value": 0.8314},82 {"time": 1142553600000, "value": 0.8273},83 {"time": 1142640000000, "value": 0.8213},84 {"time": 1142726400000, "value": 0.8207},85 {"time": 1142812800000, "value": 0.8207},86 {"time": 1142899200000, "value": 0.8215},87 {"time": 1142985600000, "value": 0.8242},88 {"time": 1143072000000, "value": 0.8273},89 {"time": 1143158400000, "value": 0.8301},90 {"time": 1143244800000, "value": 0.8346},91 {"time": 1143331200000, "value": 0.8312},92 {"time": 1143417600000, "value": 0.8312},93 {"time": 1143504000000, "value": 0.8312},94 {"time": 1143590400000, "value": 0.8306},95 {"time": 1143676800000, "value": 0.8327},96 {"time": 1143763200000, "value": 0.8282},97 {"time": 1143849600000, "value": 0.824},98 {"time": 1143936000000, "value": 0.8255},99 {"time": 1144022400000, "value": 0.8256},100 {"time": 1144108800000, "value": 0.8273},101 {"time": 1144195200000, "value": 0.8209},102 {"time": 1144281600000, "value": 0.8151},103 {"time": 1144368000000, "value": 0.8149},104 {"time": 1144454400000, "value": 0.8213},105 {"time": 1144540800000, "value": 0.8273},106 {"time": 1144627200000, "value": 0.8273},107 {"time": 1144713600000, "value": 0.8261},108 {"time": 1144800000000, "value": 0.8252},109 {"time": 1144886400000, "value": 0.824},110 {"time": 1144972800000, "value": 0.8262},111 {"time": 1145059200000, "value": 0.8258},112 {"time": 1145145600000, "value": 0.8261},113 {"time": 1145232000000, "value": 0.826},114 {"time": 1145318400000, "value": 0.8199},115 {"time": 1145404800000, "value": 0.8153},116 {"time": 1145491200000, "value": 0.8097},117 {"time": 1145577600000, "value": 0.8101},118 {"time": 1145664000000, "value": 0.8119},119 {"time": 1145750400000, "value": 0.8107},120 {"time": 1145836800000, "value": 0.8105},121 {"time": 1145923200000, "value": 0.8084},122 {"time": 1146009600000, "value": 0.8069},123 {"time": 1146096000000, "value": 0.8047},124 {"time": 1146182400000, "value": 0.8023},125 {"time": 1146268800000, "value": 0.7965},126 {"time": 1146355200000, "value": 0.7919},127 {"time": 1146441600000, "value": 0.7921},128 {"time": 1146528000000, "value": 0.7922},129 {"time": 1146614400000, "value": 0.7934},130 {"time": 1146700800000, "value": 0.7918},131 {"time": 1146787200000, "value": 0.7915},132 {"time": 1146873600000, "value": 0.787},133 {"time": 1146960000000, "value": 0.7861},134 {"time": 1147046400000, "value": 0.7861},135 {"time": 1147132800000, "value": 0.7853},136 {"time": 1147219200000, "value": 0.7867},137 {"time": 1147305600000, "value": 0.7827},138 {"time": 1147392000000, "value": 0.7834},139 {"time": 1147478400000, "value": 0.7766},140 {"time": 1147564800000, "value": 0.7751},141 {"time": 1147651200000, "value": 0.7739},142 {"time": 1147737600000, "value": 0.7767},143 {"time": 1147824000000, "value": 0.7802},144 {"time": 1147910400000, "value": 0.7788},145 {"time": 1147996800000, "value": 0.7828},146 {"time": 1148083200000, "value": 0.7816},147 {"time": 1148169600000, "value": 0.7829},148 {"time": 1148256000000, "value": 0.783},149 {"time": 1148342400000, "value": 0.7829},150 {"time": 1148428800000, "value": 0.7781},151 {"time": 1148515200000, "value": 0.7811},152 {"time": 1148601600000, "value": 0.7831},153 {"time": 1148688000000, "value": 0.7826},154 {"time": 1148774400000, "value": 0.7855},155 {"time": 1148860800000, "value": 0.7855},156 {"time": 1148947200000, "value": 0.7845},157 {"time": 1149033600000, "value": 0.7798},158 {"time": 1149120000000, "value": 0.7777},159 {"time": 1149206400000, "value": 0.7822},160 {"time": 1149292800000, "value": 0.7785},161 {"time": 1149379200000, "value": 0.7744},162 {"time": 1149465600000, "value": 0.7743},163 {"time": 1149552000000, "value": 0.7726},164 {"time": 1149638400000, "value": 0.7766},165 {"time": 1149724800000, "value": 0.7806},166 {"time": 1149811200000, "value": 0.785},167 {"time": 1149897600000, "value": 0.7907},168 {"time": 1149984000000, "value": 0.7912},169 {"time": 1150070400000, "value": 0.7913},170 {"time": 1150156800000, "value": 0.7931},171 {"time": 1150243200000, "value": 0.7952},172 {"time": 1150329600000, "value": 0.7951},173 {"time": 1150416000000, "value": 0.7928},174 {"time": 1150502400000, "value": 0.791},175 {"time": 1150588800000, "value": 0.7913},176 {"time": 1150675200000, "value": 0.7912},177 {"time": 1150761600000, "value": 0.7941},178 {"time": 1150848000000, "value": 0.7953},179 {"time": 1150934400000, "value": 0.7921},180 {"time": 1151020800000, "value": 0.7919},181 {"time": 1151107200000, "value": 0.7968},182 {"time": 1151193600000, "value": 0.7999},183 {"time": 1151280000000, "value": 0.7999},184 {"time": 1151366400000, "value": 0.7974},185 {"time": 1151452800000, "value": 0.7942},186 {"time": 1151539200000, "value": 0.796},187 {"time": 1151625600000, "value": 0.7969},188 {"time": 1151712000000, "value": 0.7862},189 {"time": 1151798400000, "value": 0.7821},190 {"time": 1151884800000, "value": 0.7821},191 {"time": 1151971200000, "value": 0.7821},192 {"time": 1152057600000, "value": 0.7811},193 {"time": 1152144000000, "value": 0.7833},194 {"time": 1152230400000, "value": 0.7849},195 {"time": 1152316800000, "value": 0.7819},196 {"time": 1152403200000, "value": 0.7809},197 {"time": 1152489600000, "value": 0.7809},198 {"time": 1152576000000, "value": 0.7827},199 {"time": 1152662400000, "value": 0.7848},200 {"time": 1152748800000, "value": 0.785},201 {"time": 1152835200000, "value": 0.7873},202 {"time": 1152921600000, "value": 0.7894},203 {"time": 1153008000000, "value": 0.7907},204 {"time": 1153094400000, "value": 0.7909},205 {"time": 1153180800000, "value": 0.7947},206 {"time": 1153267200000, "value": 0.7987},207 {"time": 1153353600000, "value": 0.799},208 {"time": 1153440000000, "value": 0.7927},209 {"time": 1153526400000, "value": 0.79},210 {"time": 1153612800000, "value": 0.7878},211 {"time": 1153699200000, "value": 0.7878},212 {"time": 1153785600000, "value": 0.7907},213 {"time": 1153872000000, "value": 0.7922},214 {"time": 1153958400000, "value": 0.7937},215 {"time": 1154044800000, "value": 0.786},216 {"time": 1154131200000, "value": 0.787},217 {"time": 1154217600000, "value": 0.7838},218 {"time": 1154304000000, "value": 0.7838},219 {"time": 1154390400000, "value": 0.7837},220 {"time": 1154476800000, "value": 0.7836},221 {"time": 1154563200000, "value": 0.7806},222 {"time": 1154649600000, "value": 0.7825},223 {"time": 1154736000000, "value": 0.7798},224 {"time": 1154822400000, "value": 0.777},225 {"time": 1154908800000, "value": 0.777},226 {"time": 1154995200000, "value": 0.7772},227 {"time": 1155081600000, "value": 0.7793},228 {"time": 1155168000000, "value": 0.7788},229 {"time": 1155254400000, "value": 0.7785},230 {"time": 1155340800000, "value": 0.7832},231 {"time": 1155427200000, "value": 0.7865},232 {"time": 1155513600000, "value": 0.7865},233 {"time": 1155600000000, "value": 0.7853},234 {"time": 1155686400000, "value": 0.7847},235 {"time": 1155772800000, "value": 0.7809},236 {"time": 1155859200000, "value": 0.778},237 {"time": 1155945600000, "value": 0.7799},238 {"time": 1156032000000, "value": 0.78},239 {"time": 1156118400000, "value": 0.7801},240 {"time": 1156204800000, "value": 0.7765},241 {"time": 1156291200000, "value": 0.7785},242 {"time": 1156377600000, "value": 0.7811},243 {"time": 1156464000000, "value": 0.782},244 {"time": 1156550400000, "value": 0.7835},245 {"time": 1156636800000, "value": 0.7845},246 {"time": 1156723200000, "value": 0.7844},247 {"time": 1156809600000, "value": 0.782},248 {"time": 1156896000000, "value": 0.7811},249 {"time": 1156982400000, "value": 0.7795},250 {"time": 1157068800000, "value": 0.7794},251 {"time": 1157155200000, "value": 0.7806},252 {"time": 1157241600000, "value": 0.7794},253 {"time": 1157328000000, "value": 0.7794},254 {"time": 1157414400000, "value": 0.7778},255 {"time": 1157500800000, "value": 0.7793},256 {"time": 1157587200000, "value": 0.7808},257 {"time": 1157673600000, "value": 0.7824},258 {"time": 1157760000000, "value": 0.787},259 {"time": 1157846400000, "value": 0.7894},260 {"time": 1157932800000, "value": 0.7893},261 {"time": 1158019200000, "value": 0.7882},262 {"time": 1158105600000, "value": 0.7871},263 {"time": 1158192000000, "value": 0.7882},264 {"time": 1158278400000, "value": 0.7871},265 {"time": 1158364800000, "value": 0.7878},266 {"time": 1158451200000, "value": 0.79},267 {"time": 1158537600000, "value": 0.7901},268 {"time": 1158624000000, "value": 0.7898},269 {"time": 1158710400000, "value": 0.7879},270 {"time": 1158796800000, "value": 0.7886},271 {"time": 1158883200000, "value": 0.7858},272 {"time": 1158969600000, "value": 0.7814},273 {"time": 1159056000000, "value": 0.7825},274 {"time": 1159142400000, "value": 0.7826},275 {"time": 1159228800000, "value": 0.7826},276 {"time": 1159315200000, "value": 0.786},277 {"time": 1159401600000, "value": 0.7878},278 {"time": 1159488000000, "value": 0.7868},279 {"time": 1159574400000, "value": 0.7883},280 {"time": 1159660800000, "value": 0.7893},281 {"time": 1159747200000, "value": 0.7892},282 {"time": 1159833600000, "value": 0.7876},283 {"time": 1159920000000, "value": 0.785},284 {"time": 1160006400000, "value": 0.787},285 {"time": 1160092800000, "value": 0.7873},286 {"time": 1160179200000, "value": 0.7901},287 {"time": 1160265600000, "value": 0.7936},288 {"time": 1160352000000, "value": 0.7939},289 {"time": 1160438400000, "value": 0.7938},290 {"time": 1160524800000, "value": 0.7956},291 {"time": 1160611200000, "value": 0.7975},292 {"time": 1160697600000, "value": 0.7978},293 {"time": 1160784000000, "value": 0.7972},294 {"time": 1160870400000, "value": 0.7995},295 {"time": 1160956800000, "value": 0.7995},296 {"time": 1161043200000, "value": 0.7994},297 {"time": 1161129600000, "value": 0.7976},298 {"time": 1161216000000, "value": 0.7977},299 {"time": 1161302400000, "value": 0.796},300 {"time": 1161388800000, "value": 0.7922},301 {"time": 1161475200000, "value": 0.7928},302 {"time": 1161561600000, "value": 0.7929},303 {"time": 1161648000000, "value": 0.7948},304 {"time": 1161734400000, "value": 0.797},305 {"time": 1161820800000, "value": 0.7953},306 {"time": 1161907200000, "value": 0.7907},307 {"time": 1161993600000, "value": 0.7872},308 {"time": 1162080000000, "value": 0.7852},309 {"time": 1162166400000, "value": 0.7852},310 {"time": 1162252800000, "value": 0.786},311 {"time": 1162339200000, "value": 0.7862},312 {"time": 1162425600000, "value": 0.7836},313 {"time": 1162512000000, "value": 0.7837},314 {"time": 1162598400000, "value": 0.784},315 {"time": 1162684800000, "value": 0.7867},316 {"time": 1162771200000, "value": 0.7867},317 {"time": 1162857600000, "value": 0.7869},318 {"time": 1162944000000, "value": 0.7837},319 {"time": 1163030400000, "value": 0.7827},320 {"time": 1163116800000, "value": 0.7825},321 {"time": 1163203200000, "value": 0.7779},322 {"time": 1163289600000, "value": 0.7791},323 {"time": 1163376000000, "value": 0.779},324 {"time": 1163462400000, "value": 0.7787},325 {"time": 1163548800000, "value": 0.78},326 {"time": 1163635200000, "value": 0.7807},327 {"time": 1163721600000, "value": 0.7803},328 {"time": 1163808000000, "value": 0.7817},329 {"time": 1163894400000, "value": 0.7799},330 {"time": 1163980800000, "value": 0.7799},331 {"time": 1164067200000, "value": 0.7795},332 {"time": 1164153600000, "value": 0.7801},333 {"time": 1164240000000, "value": 0.7765},334 {"time": 1164326400000, "value": 0.7725},335 {"time": 1164412800000, "value": 0.7683},336 {"time": 1164499200000, "value": 0.7641},337 {"time": 1164585600000, "value": 0.7639},338 {"time": 1164672000000, "value": 0.7616},339 {"time": 1164758400000, "value": 0.7608},340 {"time": 1164844800000, "value": 0.759},341 {"time": 1164931200000, "value": 0.7582},342 {"time": 1165017600000, "value": 0.7539},343 {"time": 1165104000000, "value": 0.75},344 {"time": 1165190400000, "value": 0.75},345 {"time": 1165276800000, "value": 0.7507},346 {"time": 1165363200000, "value": 0.7505},347 {"time": 1165449600000, "value": 0.7516},348 {"time": 1165536000000, "value": 0.7522},349 {"time": 1165622400000, "value": 0.7531},350 {"time": 1165708800000, "value": 0.7577},351 {"time": 1165795200000, "value": 0.7577},352 {"time": 1165881600000, "value": 0.7582},353 {"time": 1165968000000, "value": 0.755},354 {"time": 1166054400000, "value": 0.7542},355 {"time": 1166140800000, "value": 0.7576},356 {"time": 1166227200000, "value": 0.7616},357 {"time": 1166313600000, "value": 0.7648},358 {"time": 1166400000000, "value": 0.7648},359 {"time": 1166486400000, "value": 0.7641},360 {"time": 1166572800000, "value": 0.7614},361 {"time": 1166659200000, "value": 0.757},362 {"time": 1166745600000, "value": 0.7587},363 {"time": 1166832000000, "value": 0.7588},364 {"time": 1166918400000, "value": 0.762},365 {"time": 1167004800000, "value": 0.762},366 {"time": 1167091200000, "value": 0.7617},367 {"time": 1167177600000, "value": 0.7618},368 {"time": 1167264000000, "value": 0.7615},369 {"time": 1167350400000, "value": 0.7612},370 {"time": 1167436800000, "value": 0.7596},371 {"time": 1167523200000, "value": 0.758},372 {"time": 1167609600000, "value": 0.758},373 {"time": 1167696000000, "value": 0.758},374 {"time": 1167782400000, "value": 0.7547},375 {"time": 1167868800000, "value": 0.7549},376 {"time": 1167955200000, "value": 0.7613},377 {"time": 1168041600000, "value": 0.7655},378 {"time": 1168128000000, "value": 0.7693},379 {"time": 1168214400000, "value": 0.7694},380 {"time": 1168300800000, "value": 0.7688},381 {"time": 1168387200000, "value": 0.7678},382 {"time": 1168473600000, "value": 0.7708},383 {"time": 1168560000000, "value": 0.7727},384 {"time": 1168646400000, "value": 0.7749},385 {"time": 1168732800000, "value": 0.7741},386 {"time": 1168819200000, "value": 0.7741},387 {"time": 1168905600000, "value": 0.7732},388 {"time": 1168992000000, "value": 0.7727},389 {"time": 1169078400000, "value": 0.7737},390 {"time": 1169164800000, "value": 0.7724},391 {"time": 1169251200000, "value": 0.7712},392 {"time": 1169337600000, "value": 0.772},393 {"time": 1169424000000, "value": 0.7721},394 {"time": 1169510400000, "value": 0.7717},395 {"time": 1169596800000, "value": 0.7704},396 {"time": 1169683200000, "value": 0.769},397 {"time": 1169769600000, "value": 0.7711},398 {"time": 1169856000000, "value": 0.774},399 {"time": 1169942400000, "value": 0.7745},400 {"time": 1170028800000, "value": 0.7745},401 {"time": 1170115200000, "value": 0.774},402 {"time": 1170201600000, "value": 0.7716},403 {"time": 1170288000000, "value": 0.7713},404 {"time": 1170374400000, "value": 0.7678},405 {"time": 1170460800000, "value": 0.7688},406 {"time": 1170547200000, "value": 0.7718},407 {"time": 1170633600000, "value": 0.7718},408 {"time": 1170720000000, "value": 0.7728},409 {"time": 1170806400000, "value": 0.7729},410 {"time": 1170892800000, "value": 0.7698},411 {"time": 1170979200000, "value": 0.7685},412 {"time": 1171065600000, "value": 0.7681},413 {"time": 1171152000000, "value": 0.769},414 {"time": 1171238400000, "value": 0.769},415 {"time": 1171324800000, "value": 0.7698},416 {"time": 1171411200000, "value": 0.7699},417 {"time": 1171497600000, "value": 0.7651},418 {"time": 1171584000000, "value": 0.7613},419 {"time": 1171670400000, "value": 0.7616},420 {"time": 1171756800000, "value": 0.7614},421 {"time": 1171843200000, "value": 0.7614},422 {"time": 1171929600000, "value": 0.7607},423 {"time": 1172016000000, "value": 0.7602},424 {"time": 1172102400000, "value": 0.7611},425 {"time": 1172188800000, "value": 0.7622},426 {"time": 1172275200000, "value": 0.7615},427 {"time": 1172361600000, "value": 0.7598},428 {"time": 1172448000000, "value": 0.7598},429 {"time": 1172534400000, "value": 0.7592},430 {"time": 1172620800000, "value": 0.7573},431 {"time": 1172707200000, "value": 0.7566},432 {"time": 1172793600000, "value": 0.7567},433 {"time": 1172880000000, "value": 0.7591},434 {"time": 1172966400000, "value": 0.7582},435 {"time": 1173052800000, "value": 0.7585},436 {"time": 1173139200000, "value": 0.7613},437 {"time": 1173225600000, "value": 0.7631},438 {"time": 1173312000000, "value": 0.7615},439 {"time": 1173398400000, "value": 0.76},440 {"time": 1173484800000, "value": 0.7613},441 {"time": 1173571200000, "value": 0.7627},442 {"time": 1173657600000, "value": 0.7627},443 {"time": 1173744000000, "value": 0.7608},444 {"time": 1173830400000, "value": 0.7583},445 {"time": 1173916800000, "value": 0.7575},446 {"time": 1174003200000, "value": 0.7562},447 {"time": 1174089600000, "value": 0.752},448 {"time": 1174176000000, "value": 0.7512},449 {"time": 1174262400000, "value": 0.7512},450 {"time": 1174348800000, "value": 0.7517},451 {"time": 1174435200000, "value": 0.752},452 {"time": 1174521600000, "value": 0.7511},453 {"time": 1174608000000, "value": 0.748},454 {"time": 1174694400000, "value": 0.7509},455 {"time": 1174780800000, "value": 0.7531},456 {"time": 1174867200000, "value": 0.7531},457 {"time": 1174953600000, "value": 0.7527},458 {"time": 1175040000000, "value": 0.7498},459 {"time": 1175126400000, "value": 0.7493},460 {"time": 1175212800000, "value": 0.7504},461 {"time": 1175299200000, "value": 0.75},462 {"time": 1175385600000, "value": 0.7491},463 {"time": 1175472000000, "value": 0.7491},464 {"time": 1175558400000, "value": 0.7485},465 {"time": 1175644800000, "value": 0.7484},466 {"time": 1175731200000, "value": 0.7492},467 {"time": 1175817600000, "value": 0.7471},468 {"time": 1175904000000, "value": 0.7459},469 {"time": 1175990400000, "value": 0.7477},470 {"time": 1176076800000, "value": 0.7477},471 {"time": 1176163200000, "value": 0.7483},472 {"time": 1176249600000, "value": 0.7458},473 {"time": 1176336000000, "value": 0.7448},474 {"time": 1176422400000, "value": 0.743},475 {"time": 1176508800000, "value": 0.7399},476 {"time": 1176595200000, "value": 0.7395},477 {"time": 1176681600000, "value": 0.7395},478 {"time": 1176768000000, "value": 0.7378},479 {"time": 1176854400000, "value": 0.7382},480 {"time": 1176940800000, "value": 0.7362},481 {"time": 1177027200000, "value": 0.7355},482 {"time": 1177113600000, "value": 0.7348},483 {"time": 1177200000000, "value": 0.7361},484 {"time": 1177286400000, "value": 0.7361},485 {"time": 1177372800000, "value": 0.7365},486 {"time": 1177459200000, "value": 0.7362},487 {"time": 1177545600000, "value": 0.7331},488 {"time": 1177632000000, "value": 0.7339},489 {"time": 1177718400000, "value": 0.7344},490 {"time": 1177804800000, "value": 0.7327},491 {"time": 1177891200000, "value": 0.7327},492 {"time": 1177977600000, "value": 0.7336},493 {"time": 1178064000000, "value": 0.7333},494 {"time": 1178150400000, "value": 0.7359},495 {"time": 1178236800000, "value": 0.7359},496 {"time": 1178323200000, "value": 0.7372},497 {"time": 1178409600000, "value": 0.736},498 {"time": 1178496000000, "value": 0.736},499 {"time": 1178582400000, "value": 0.735},500 {"time": 1178668800000, "value": 0.7365},501 {"time": 1178755200000, "value": 0.7384},502 {"time": 1178841600000, "value": 0.7395},503 {"time": 1178928000000, "value": 0.7413},504 {"time": 1179014400000, "value": 0.7397},505 {"time": 1179100800000, "value": 0.7396},506 {"time": 1179187200000, "value": 0.7385},507 {"time": 1179273600000, "value": 0.7378},508 {"time": 1179360000000, "value": 0.7366},509 {"time": 1179446400000, "value": 0.74},510 {"time": 1179532800000, "value": 0.7411},511 {"time": 1179619200000, "value": 0.7406},512 {"time": 1179705600000, "value": 0.7405},513 {"time": 1179792000000, "value": 0.7414},514 {"time": 1179878400000, "value": 0.7431},515 {"time": 1179964800000, "value": 0.7431},516 {"time": 1180051200000, "value": 0.7438},517 {"time": 1180137600000, "value": 0.7443},518 {"time": 1180224000000, "value": 0.7443},519 {"time": 1180310400000, "value": 0.7443},520 {"time": 1180396800000, "value": 0.7434},521 {"time": 1180483200000, "value": 0.7429},522 {"time": 1180569600000, "value": 0.7442},523 {"time": 1180656000000, "value": 0.744},524 {"time": 1180742400000, "value": 0.7439},525 {"time": 1180828800000, "value": 0.7437},526 {"time": 1180915200000, "value": 0.7437},527 {"time": 1181001600000, "value": 0.7429},528 {"time": 1181088000000, "value": 0.7403},529 {"time": 1181174400000, "value": 0.7399},530 {"time": 1181260800000, "value": 0.7418},531 {"time": 1181347200000, "value": 0.7468},532 {"time": 1181433600000, "value": 0.748},533 {"time": 1181520000000, "value": 0.748},534 {"time": 1181606400000, "value": 0.749},535 {"time": 1181692800000, "value": 0.7494},536 {"time": 1181779200000, "value": 0.7522},537 {"time": 1181865600000, "value": 0.7515},538 {"time": 1181952000000, "value": 0.7502},539 {"time": 1182038400000, "value": 0.7472},540 {"time": 1182124800000, "value": 0.7472},541 {"time": 1182211200000, "value": 0.7462},542 {"time": 1182297600000, "value": 0.7455},543 {"time": 1182384000000, "value": 0.7449},544 {"time": 1182470400000, "value": 0.7467},545 {"time": 1182556800000, "value": 0.7458},546 {"time": 1182643200000, "value": 0.7427},547 {"time": 1182729600000, "value": 0.7427},548 {"time": 1182816000000, "value": 0.743},549 {"time": 1182902400000, "value": 0.7429},550 {"time": 1182988800000, "value": 0.744},551 {"time": 1183075200000, "value": 0.743},552 {"time": 1183161600000, "value": 0.7422},553 {"time": 1183248000000, "value": 0.7388},554 {"time": 1183334400000, "value": 0.7388},555 {"time": 1183420800000, "value": 0.7369},556 {"time": 1183507200000, "value": 0.7345},557 {"time": 1183593600000, "value": 0.7345},558 {"time": 1183680000000, "value": 0.7345},559 {"time": 1183766400000, "value": 0.7352},560 {"time": 1183852800000, "value": 0.7341},561 {"time": 1183939200000, "value": 0.7341},562 {"time": 1184025600000, "value": 0.734},563 {"time": 1184112000000, "value": 0.7324},564 {"time": 1184198400000, "value": 0.7272},565 {"time": 1184284800000, "value": 0.7264},566 {"time": 1184371200000, "value": 0.7255},567 {"time": 1184457600000, "value": 0.7258},568 {"time": 1184544000000, "value": 0.7258},569 {"time": 1184630400000, "value": 0.7256},570 {"time": 1184716800000, "value": 0.7257},571 {"time": 1184803200000, "value": 0.7247},572 {"time": 1184889600000, "value": 0.7243},573 {"time": 1184976000000, "value": 0.7244},574 {"time": 1185062400000, "value": 0.7235},575 {"time": 1185148800000, "value": 0.7235},576 {"time": 1185235200000, "value": 0.7235},577 {"time": 1185321600000, "value": 0.7235},578 {"time": 1185408000000, "value": 0.7262},579 {"time": 1185494400000, "value": 0.7288},580 {"time": 1185580800000, "value": 0.7301},581 {"time": 1185667200000, "value": 0.7337},582 {"time": 1185753600000, "value": 0.7337},583 {"time": 1185840000000, "value": 0.7324},584 {"time": 1185926400000, "value": 0.7297},585 {"time": 1186012800000, "value": 0.7317},586 {"time": 1186099200000, "value": 0.7315},587 {"time": 1186185600000, "value": 0.7288},588 {"time": 1186272000000, "value": 0.7263},589 {"time": 1186358400000, "value": 0.7263},590 {"time": 1186444800000, "value": 0.7242},591 {"time": 1186531200000, "value": 0.7253},592 {"time": 1186617600000, "value": 0.7264},593 {"time": 1186704000000, "value": 0.727},594 {"time": 1186790400000, "value": 0.7312},595 {"time": 1186876800000, "value": 0.7305},596 {"time": 1186963200000, "value": 0.7305},597 {"time": 1187049600000, "value": 0.7318},598 {"time": 1187136000000, "value": 0.7358},599 {"time": 1187222400000, "value": 0.7409},600 {"time": 1187308800000, "value": 0.7454},601 {"time": 1187395200000, "value": 0.7437},602 {"time": 1187481600000, "value": 0.7424},603 {"time": 1187568000000, "value": 0.7424},604 {"time": 1187654400000, "value": 0.7415},605 {"time": 1187740800000, "value": 0.7419},606 {"time": 1187827200000, "value": 0.7414},607 {"time": 1187913600000, "value": 0.7377},608 {"time": 1188000000000, "value": 0.7355},609 {"time": 1188086400000, "value": 0.7315},610 {"time": 1188172800000, "value": 0.7315},611 {"time": 1188259200000, "value": 0.732},612 {"time": 1188345600000, "value": 0.7332},613 {"time": 1188432000000, "value": 0.7346},614 {"time": 1188518400000, "value": 0.7328},615 {"time": 1188604800000, "value": 0.7323},616 {"time": 1188691200000, "value": 0.734},617 {"time": 1188777600000, "value": 0.734},618 {"time": 1188864000000, "value": 0.7336},619 {"time": 1188950400000, "value": 0.7351},620 {"time": 1189036800000, "value": 0.7346},621 {"time": 1189123200000, "value": 0.7321},622 {"time": 1189209600000, "value": 0.7294},623 {"time": 1189296000000, "value": 0.7266},624 {"time": 1189382400000, "value": 0.7266},625 {"time": 1189468800000, "value": 0.7254},626 {"time": 1189555200000, "value": 0.7242},627 {"time": 1189641600000, "value": 0.7213},628 {"time": 1189728000000, "value": 0.7197},629 {"time": 1189814400000, "value": 0.7209},630 {"time": 1189900800000, "value": 0.721},631 {"time": 1189987200000, "value": 0.721},632 {"time": 1190073600000, "value": 0.721},633 {"time": 1190160000000, "value": 0.7209},634 {"time": 1190246400000, "value": 0.7159},635 {"time": 1190332800000, "value": 0.7133},636 {"time": 1190419200000, "value": 0.7105},637 {"time": 1190505600000, "value": 0.7099},638 {"time": 1190592000000, "value": 0.7099},639 {"time": 1190678400000, "value": 0.7093},640 {"time": 1190764800000, "value": 0.7093},641 {"time": 1190851200000, "value": 0.7076},642 {"time": 1190937600000, "value": 0.707},643 {"time": 1191024000000, "value": 0.7049},644 {"time": 1191110400000, "value": 0.7012},645 {"time": 1191196800000, "value": 0.7011},646 {"time": 1191283200000, "value": 0.7019},647 {"time": 1191369600000, "value": 0.7046},648 {"time": 1191456000000, "value": 0.7063},649 {"time": 1191542400000, "value": 0.7089},650 {"time": 1191628800000, "value": 0.7077},651 {"time": 1191715200000, "value": 0.7077},652 {"time": 1191801600000, "value": 0.7077},653 {"time": 1191888000000, "value": 0.7091},654 {"time": 1191974400000, "value": 0.7118},655 {"time": 1192060800000, "value": 0.7079},656 {"time": 1192147200000, "value": 0.7053},657 {"time": 1192233600000, "value": 0.705},658 {"time": 1192320000000, "value": 0.7055},659 {"time": 1192406400000, "value": 0.7055},660 {"time": 1192492800000, "value": 0.7045},661 {"time": 1192579200000, "value": 0.7051},662 {"time": 1192665600000, "value": 0.7051},663 {"time": 1192752000000, "value": 0.7017},664 {"time": 1192838400000, "value": 0.7},665 {"time": 1192924800000, "value": 0.6995},666 {"time": 1193011200000, "value": 0.6994},667 {"time": 1193097600000, "value": 0.7014},668 {"time": 1193184000000, "value": 0.7036},669 {"time": 1193270400000, "value": 0.7021},670 {"time": 1193356800000, "value": 0.7002},671 {"time": 1193443200000, "value": 0.6967},672 {"time": 1193529600000, "value": 0.695},673 {"time": 1193616000000, "value": 0.695},674 {"time": 1193702400000, "value": 0.6939},675 {"time": 1193788800000, "value": 0.694},676 {"time": 1193875200000, "value": 0.6922},677 {"time": 1193961600000, "value": 0.6919},678 {"time": 1194048000000, "value": 0.6914},679 {"time": 1194134400000, "value": 0.6894},680 {"time": 1194220800000, "value": 0.6891},681 {"time": 1194307200000, "value": 0.6904},682 {"time": 1194393600000, "value": 0.689},683 {"time": 1194480000000, "value": 0.6834},684 {"time": 1194566400000, "value": 0.6823},685 {"time": 1194652800000, "value": 0.6807},686 {"time": 1194739200000, "value": 0.6815},687 {"time": 1194825600000, "value": 0.6815},688 {"time": 1194912000000, "value": 0.6847},689 {"time": 1194998400000, "value": 0.6859},690 {"time": 1195084800000, "value": 0.6822},691 {"time": 1195171200000, "value": 0.6827},692 {"time": 1195257600000, "value": 0.6837},693 {"time": 1195344000000, "value": 0.6823},694 {"time": 1195430400000, "value": 0.6822},695 {"time": 1195516800000, "value": 0.6822},696 {"time": 1195603200000, "value": 0.6792},697 {"time": 1195689600000, "value": 0.6746},698 {"time": 1195776000000, "value": 0.6735},699 {"time": 1195862400000, "value": 0.6731},700 {"time": 1195948800000, "value": 0.6742},701 {"time": 1196035200000, "value": 0.6744},702 {"time": 1196121600000, "value": 0.6739},703 {"time": 1196208000000, "value": 0.6731},704 {"time": 1196294400000, "value": 0.6761},705 {"time": 1196380800000, "value": 0.6761},706 {"time": 1196467200000, "value": 0.6785},707 {"time": 1196553600000, "value": 0.6818},708 {"time": 1196640000000, "value": 0.6836},709 {"time": 1196726400000, "value": 0.6823},710 {"time": 1196812800000, "value": 0.6805},711 {"time": 1196899200000, "value": 0.6793},712 {"time": 1196985600000, "value": 0.6849},713 {"time": 1197072000000, "value": 0.6833},714 {"time": 1197158400000, "value": 0.6825},715 {"time": 1197244800000, "value": 0.6825},716 {"time": 1197331200000, "value": 0.6816},717 {"time": 1197417600000, "value": 0.6799},718 {"time": 1197504000000, "value": 0.6813},719 {"time": 1197590400000, "value": 0.6809},720 {"time": 1197676800000, "value": 0.6868},721 {"time": 1197763200000, "value": 0.6933},722 {"time": 1197849600000, "value": 0.6933},723 {"time": 1197936000000, "value": 0.6945},724 {"time": 1198022400000, "value": 0.6944},725 {"time": 1198108800000, "value": 0.6946},726 {"time": 1198195200000, "value": 0.6964},727 {"time": 1198281600000, "value": 0.6965},728 {"time": 1198368000000, "value": 0.6956},729 {"time": 1198454400000, "value": 0.6956},730 {"time": 1198540800000, "value": 0.695},731 {"time": 1198627200000, "value": 0.6948},732 {"time": 1198713600000, "value": 0.6928},733 {"time": 1198800000000, "value": 0.6887},734 {"time": 1198886400000, "value": 0.6824},735 {"time": 1198972800000, "value": 0.6794},736 {"time": 1199059200000, "value": 0.6794},737 {"time": 1199145600000, "value": 0.6803},738 {"time": 1199232000000, "value": 0.6855},739 {"time": 1199318400000, "value": 0.6824},740 {"time": 1199404800000, "value": 0.6791},741 {"time": 1199491200000, "value": 0.6783},742 {"time": 1199577600000, "value": 0.6785},743 {"time": 1199664000000, "value": 0.6785},744 {"time": 1199750400000, "value": 0.6797},745 {"time": 1199836800000, "value": 0.68},746 {"time": 1199923200000, "value": 0.6803},747 {"time": 1200009600000, "value": 0.6805},748 {"time": 1200096000000, "value": 0.676},749 {"time": 1200182400000, "value": 0.677},750 {"time": 1200268800000, "value": 0.677},751 {"time": 1200355200000, "value": 0.6736},752 {"time": 1200441600000, "value": 0.6726},753 {"time": 1200528000000, "value": 0.6764},754 {"time": 1200614400000, "value": 0.6821},755 {"time": 1200700800000, "value": 0.6831},756 {"time": 1200787200000, "value": 0.6842},757 {"time": 1200873600000, "value": 0.6842},758 {"time": 1200960000000, "value": 0.6887},759 {"time": 1201046400000, "value": 0.6903},760 {"time": 1201132800000, "value": 0.6848},761 {"time": 1201219200000, "value": 0.6824},762 {"time": 1201305600000, "value": 0.6788},763 {"time": 1201392000000, "value": 0.6814},764 {"time": 1201478400000, "value": 0.6814},765 {"time": 1201564800000, "value": 0.6797},766 {"time": 1201651200000, "value": 0.6769},767 {"time": 1201737600000, "value": 0.6765},768 {"time": 1201824000000, "value": 0.6733},769 {"time": 1201910400000, "value": 0.6729},770 {"time": 1201996800000, "value": 0.6758},771 {"time": 1202083200000, "value": 0.6758},772 {"time": 1202169600000, "value": 0.675},773 {"time": 1202256000000, "value": 0.678},774 {"time": 1202342400000, "value": 0.6833},775 {"time": 1202428800000, "value": 0.6856},776 {"time": 1202515200000, "value": 0.6903},777 {"time": 1202601600000, "value": 0.6896},778 {"time": 1202688000000, "value": 0.6896},779 {"time": 1202774400000, "value": 0.6882},780 {"time": 1202860800000, "value": 0.6879},781 {"time": 1202947200000, "value": 0.6862},782 {"time": 1203033600000, "value": 0.6852},783 {"time": 1203120000000, "value": 0.6823},784 {"time": 1203206400000, "value": 0.6813},785 {"time": 1203292800000, "value": 0.6813},786 {"time": 1203379200000, "value": 0.6822},787 {"time": 1203465600000, "value": 0.6802},788 {"time": 1203552000000, "value": 0.6802},789 {"time": 1203638400000, "value": 0.6784},790 {"time": 1203724800000, "value": 0.6748},791 {"time": 1203811200000, "value": 0.6747},792 {"time": 1203897600000, "value": 0.6747},793 {"time": 1203984000000, "value": 0.6748},794 {"time": 1204070400000, "value": 0.6733},795 {"time": 1204156800000, "value": 0.665},796 {"time": 1204243200000, "value": 0.6611},797 {"time": 1204329600000, "value": 0.6583},798 {"time": 1204416000000, "value": 0.659},799 {"time": 1204502400000, "value": 0.659},800 {"time": 1204588800000, "value": 0.6581},801 {"time": 1204675200000, "value": 0.6578},802 {"time": 1204761600000, "value": 0.6574},803 {"time": 1204848000000, "value": 0.6532},804 {"time": 1204934400000, "value": 0.6502},805 {"time": 1205020800000, "value": 0.6514},806 {"time": 1205107200000, "value": 0.6514},807 {"time": 1205193600000, "value": 0.6507},808 {"time": 1205280000000, "value": 0.651},809 {"time": 1205366400000, "value": 0.6489},810 {"time": 1205452800000, "value": 0.6424},811 {"time": 1205539200000, "value": 0.6406},812 {"time": 1205625600000, "value": 0.6382},813 {"time": 1205712000000, "value": 0.6382},814 {"time": 1205798400000, "value": 0.6341},815 {"time": 1205884800000, "value": 0.6344},816 {"time": 1205971200000, "value": 0.6378},817 {"time": 1206057600000, "value": 0.6439},818 {"time": 1206144000000, "value": 0.6478},819 {"time": 1206230400000, "value": 0.6481},820 {"time": 1206316800000, "value": 0.6481},821 {"time": 1206403200000, "value": 0.6494},822 {"time": 1206489600000, "value": 0.6438},823 {"time": 1206576000000, "value": 0.6377},824 {"time": 1206662400000, "value": 0.6329},825 {"time": 1206748800000, "value": 0.6336},826 {"time": 1206835200000, "value": 0.6333},827 {"time": 1206921600000, "value": 0.6333},828 {"time": 1207008000000, "value": 0.633},829 {"time": 1207094400000, "value": 0.6371},830 {"time": 1207180800000, "value": 0.6403},831 {"time": 1207267200000, "value": 0.6396},832 {"time": 1207353600000, "value": 0.6364},833 {"time": 1207440000000, "value": 0.6356},834 {"time": 1207526400000, "value": 0.6356},835 {"time": 1207612800000, "value": 0.6368},836 {"time": 1207699200000, "value": 0.6357},837 {"time": 1207785600000, "value": 0.6354},838 {"time": 1207872000000, "value": 0.632},839 {"time": 1207958400000, "value": 0.6332},840 {"time": 1208044800000, "value": 0.6328},841 {"time": 1208131200000, "value": 0.6331},842 {"time": 1208217600000, "value": 0.6342},843 {"time": 1208304000000, "value": 0.6321},844 {"time": 1208390400000, "value": 0.6302},845 {"time": 1208476800000, "value": 0.6278},846 {"time": 1208563200000, "value": 0.6308},847 {"time": 1208649600000, "value": 0.6324},848 {"time": 1208736000000, "value": 0.6324},849 {"time": 1208822400000, "value": 0.6307},850 {"time": 1208908800000, "value": 0.6277},851 {"time": 1208995200000, "value": 0.6269},852 {"time": 1209081600000, "value": 0.6335},853 {"time": 1209168000000, "value": 0.6392},854 {"time": 1209254400000, "value": 0.64},855 {"time": 1209340800000, "value": 0.6401},856 {"time": 1209427200000, "value": 0.6396},857 {"time": 1209513600000, "value": 0.6407},858 {"time": 1209600000000, "value": 0.6423},859 {"time": 1209686400000, "value": 0.6429},860 {"time": 1209772800000, "value": 0.6472},861 {"time": 1209859200000, "value": 0.6485},862 {"time": 1209945600000, "value": 0.6486},863 {"time": 1210032000000, "value": 0.6467},864 {"time": 1210118400000, "value": 0.6444},865 {"time": 1210204800000, "value": 0.6467},866 {"time": 1210291200000, "value": 0.6509},867 {"time": 1210377600000, "value": 0.6478},868 {"time": 1210464000000, "value": 0.6461},869 {"time": 1210550400000, "value": 0.6461},870 {"time": 1210636800000, "value": 0.6468},871 {"time": 1210723200000, "value": 0.6449},872 {"time": 1210809600000, "value": 0.647},873 {"time": 1210896000000, "value": 0.6461},874 {"time": 1210982400000, "value": 0.6452},875 {"time": 1211068800000, "value": 0.6422},876 {"time": 1211155200000, "value": 0.6422},877 {"time": 1211241600000, "value": 0.6425},878 {"time": 1211328000000, "value": 0.6414},879 {"time": 1211414400000, "value": 0.6366},880 {"time": 1211500800000, "value": 0.6346},881 {"time": 1211587200000, "value": 0.635},882 {"time": 1211673600000, "value": 0.6346},883 {"time": 1211760000000, "value": 0.6346},884 {"time": 1211846400000, "value": 0.6343},885 {"time": 1211932800000, "value": 0.6346},886 {"time": 1212019200000, "value": 0.6379},887 {"time": 1212105600000, "value": 0.6416},888 {"time": 1212192000000, "value": 0.6442},889 {"time": 1212278400000, "value": 0.6431},890 {"time": 1212364800000, "value": 0.6431},891 {"time": 1212451200000, "value": 0.6435},892 {"time": 1212537600000, "value": 0.644},893 {"time": 1212624000000, "value": 0.6473},894 {"time": 1212710400000, "value": 0.6469},895 {"time": 1212796800000, "value": 0.6386},896 {"time": 1212883200000, "value": 0.6356},897 {"time": 1212969600000, "value": 0.634},898 {"time": 1213056000000, "value": 0.6346},899 {"time": 1213142400000, "value": 0.643},900 {"time": 1213228800000, "value": 0.6452},901 {"time": 1213315200000, "value": 0.6467},902 {"time": 1213401600000, "value": 0.6506},903 {"time": 1213488000000, "value": 0.6504},904 {"time": 1213574400000, "value": 0.6503},905 {"time": 1213660800000, "value": 0.6481},906 {"time": 1213747200000, "value": 0.6451},907 {"time": 1213833600000, "value": 0.645},908 {"time": 1213920000000, "value": 0.6441},909 {"time": 1214006400000, "value": 0.6414},910 {"time": 1214092800000, "value": 0.6409},911 {"time": 1214179200000, "value": 0.6409},912 {"time": 1214265600000, "value": 0.6428},913 {"time": 1214352000000, "value": 0.6431},914 {"time": 1214438400000, "value": 0.6418},915 {"time": 1214524800000, "value": 0.6371},916 {"time": 1214611200000, "value": 0.6349},917 {"time": 1214697600000, "value": 0.6333},918 {"time": 1214784000000, "value": 0.6334},919 {"time": 1214870400000, "value": 0.6338},920 {"time": 1214956800000, "value": 0.6342},921 {"time": 1215043200000, "value": 0.632},922 {"time": 1215129600000, "value": 0.6318},923 {"time": 1215216000000, "value": 0.637},924 {"time": 1215302400000, "value": 0.6368},925 {"time": 1215388800000, "value": 0.6368},926 {"time": 1215475200000, "value": 0.6383},927 {"time": 1215561600000, "value": 0.6371},928 {"time": 1215648000000, "value": 0.6371},929 {"time": 1215734400000, "value": 0.6355},930 {"time": 1215820800000, "value": 0.632},931 {"time": 1215907200000, "value": 0.6277},932 {"time": 1215993600000, "value": 0.6276},933 {"time": 1216080000000, "value": 0.6291},934 {"time": 1216166400000, "value": 0.6274},935 {"time": 1216252800000, "value": 0.6293},936 {"time": 1216339200000, "value": 0.6311},937 {"time": 1216425600000, "value": 0.631},938 {"time": 1216512000000, "value": 0.6312},939 {"time": 1216598400000, "value": 0.6312},940 {"time": 1216684800000, "value": 0.6304},941 {"time": 1216771200000, "value": 0.6294},942 {"time": 1216857600000, "value": 0.6348},943 {"time": 1216944000000, "value": 0.6378},944 {"time": 1217030400000, "value": 0.6368},945 {"time": 1217116800000, "value": 0.6368},946 {"time": 1217203200000, "value": 0.6368},947 {"time": 1217289600000, "value": 0.636},948 {"time": 1217376000000, "value": 0.637},949 {"time": 1217462400000, "value": 0.6418},950 {"time": 1217548800000, "value": 0.6411},951 {"time": 1217635200000, "value": 0.6435},952 {"time": 1217721600000, "value": 0.6427},953 {"time": 1217808000000, "value": 0.6427},954 {"time": 1217894400000, "value": 0.6419},955 {"time": 1217980800000, "value": 0.6446},956 {"time": 1218067200000, "value": 0.6468},957 {"time": 1218153600000, "value": 0.6487},958 {"time": 1218240000000, "value": 0.6594},959 {"time": 1218326400000, "value": 0.6666},960 {"time": 1218412800000, "value": 0.6666},961 {"time": 1218499200000, "value": 0.6678},962 {"time": 1218585600000, "value": 0.6712},963 {"time": 1218672000000, "value": 0.6705},964 {"time": 1218758400000, "value": 0.6718},965 {"time": 1218844800000, "value": 0.6784},966 {"time": 1218931200000, "value": 0.6811},967 {"time": 1219017600000, "value": 0.6811},968 {"time": 1219104000000, "value": 0.6794},969 {"time": 1219190400000, "value": 0.6804},970 {"time": 1219276800000, "value": 0.6781},971 {"time": 1219363200000, "value": 0.6756},972 {"time": 1219449600000, "value": 0.6735},973 {"time": 1219536000000, "value": 0.6763},974 {"time": 1219622400000, "value": 0.6762},975 {"time": 1219708800000, "value": 0.6777},976 {"time": 1219795200000, "value": 0.6815},977 {"time": 1219881600000, "value": 0.6802},978 {"time": 1219968000000, "value": 0.678},979 {"time": 1220054400000, "value": 0.6796},980 {"time": 1220140800000, "value": 0.6817},981 {"time": 1220227200000, "value": 0.6817},982 {"time": 1220313600000, "value": 0.6832},983 {"time": 1220400000000, "value": 0.6877},984 {"time": 1220486400000, "value": 0.6912},985 {"time": 1220572800000, "value": 0.6914},986 {"time": 1220659200000, "value": 0.7009},987 {"time": 1220745600000, "value": 0.7012},988 {"time": 1220832000000, "value": 0.701},989 {"time": 1220918400000, "value": 0.7005},990 {"time": 1221004800000, "value": 0.7076},991 {"time": 1221091200000, "value": 0.7087},992 {"time": 1221177600000, "value": 0.717},993 {"time": 1221264000000, "value": 0.7105},994 {"time": 1221350400000, "value": 0.7031},995 {"time": 1221436800000, "value": 0.7029},996 {"time": 1221523200000, "value": 0.7006},997 {"time": 1221609600000, "value": 0.7035},998 {"time": 1221696000000, "value": 0.7045},999 {"time": 1221782400000, "value": 0.6956},1000 {"time": 1221868800000, "value": 0.6988},1001 {"time": 1221955200000, "value": 0.6915},1002 {"time": 1222041600000, "value": 0.6914},1003 {"time": 1222128000000, "value": 0.6859},1004 {"time": 1222214400000, "value": 0.6778},1005 {"time": 1222300800000, "value": 0.6815},1006 {"time": 1222387200000, "value": 0.6815},1007 {"time": 1222473600000, "value": 0.6843},1008 {"time": 1222560000000, "value": 0.6846},1009 {"time": 1222646400000, "value": 0.6846},1010 {"time": 1222732800000, "value": 0.6923},1011 {"time": 1222819200000, "value": 0.6997},1012 {"time": 1222905600000, "value": 0.7098},1013 {"time": 1222992000000, "value": 0.7188},1014 {"time": 1223078400000, "value": 0.7232},1015 {"time": 1223164800000, "value": 0.7262},1016 {"time": 1223251200000, "value": 0.7266},1017 {"time": 1223337600000, "value": 0.7359},1018 {"time": 1223424000000, "value": 0.7368},1019 {"time": 1223510400000, "value": 0.7337},1020 {"time": 1223596800000, "value": 0.7317},1021 {"time": 1223683200000, "value": 0.7387},1022 {"time": 1223769600000, "value": 0.7467},1023 {"time": 1223856000000, "value": 0.7461},1024 {"time": 1223942400000, "value": 0.7366},1025 {"time": 1224028800000, "value": 0.7319},1026 {"time": 1224115200000, "value": 0.7361},1027 {"time": 1224201600000, "value": 0.7437},1028 {"time": 1224288000000, "value": 0.7432},1029 {"time": 1224374400000, "value": 0.7461},1030 {"time": 1224460800000, "value": 0.7461},1031 {"time": 1224547200000, "value": 0.7454},1032 {"time": 1224633600000, "value": 0.7549},1033 {"time": 1224720000000, "value": 0.7742},1034 {"time": 1224806400000, "value": 0.7801},1035 {"time": 1224892800000, "value": 0.7903},1036 {"time": 1224979200000, "value": 0.7876},1037 {"time": 1225065600000, "value": 0.7928},1038 {"time": 1225152000000, "value": 0.7991},1039 {"time": 1225238400000, "value": 0.8007},1040 {"time": 1225324800000, "value": 0.7823},1041 {"time": 1225411200000, "value": 0.7661},1042 {"time": 1225497600000, "value": 0.785},1043 {"time": 1225584000000, "value": 0.7863},1044 {"time": 1225670400000, "value": 0.7862},1045 {"time": 1225756800000, "value": 0.7821},1046 {"time": 1225843200000, "value": 0.7858},1047 {"time": 1225929600000, "value": 0.7731},1048 {"time": 1226016000000, "value": 0.7779},1049 {"time": 1226102400000, "value": 0.7844},1050 {"time": 1226188800000, "value": 0.7866},1051 {"time": 1226275200000, "value": 0.7864},1052 {"time": 1226361600000, "value": 0.7788},1053 {"time": 1226448000000, "value": 0.7875},1054 {"time": 1226534400000, "value": 0.7971},1055 {"time": 1226620800000, "value": 0.8004},1056 {"time": 1226707200000, "value": 0.7857},1057 {"time": 1226793600000, "value": 0.7932},1058 {"time": 1226880000000, "value": 0.7938},1059 {"time": 1226966400000, "value": 0.7927},1060 {"time": 1227052800000, "value": 0.7918},1061 {"time": 1227139200000, "value": 0.7919},1062 {"time": 1227225600000, "value": 0.7989},1063 {"time": 1227312000000, "value": 0.7988},1064 {"time": 1227398400000, "value": 0.7949},1065 {"time": 1227484800000, "value": 0.7948},1066 {"time": 1227571200000, "value": 0.7882},1067 {"time": 1227657600000, "value": 0.7745},1068 {"time": 1227744000000, "value": 0.771},1069 {"time": 1227830400000, "value": 0.775},1070 {"time": 1227916800000, "value": 0.7791},1071 {"time": 1228003200000, "value": 0.7882},1072 {"time": 1228089600000, "value": 0.7882},1073 {"time": 1228176000000, "value": 0.7899},1074 {"time": 1228262400000, "value": 0.7905},1075 {"time": 1228348800000, "value": 0.7889},1076 {"time": 1228435200000, "value": 0.7879},1077 {"time": 1228521600000, "value": 0.7855},1078 {"time": 1228608000000, "value": 0.7866},1079 {"time": 1228694400000, "value": 0.7865},1080 {"time": 1228780800000, "value": 0.7795},1081 {"time": 1228867200000, "value": 0.7758},1082 {"time": 1228953600000, "value": 0.7717},1083 {"time": 1229040000000, "value": 0.761},1084 {"time": 1229126400000, "value": 0.7497},1085 {"time": 1229212800000, "value": 0.7471},1086 {"time": 1229299200000, "value": 0.7473},1087 {"time": 1229385600000, "value": 0.7407},1088 {"time": 1229472000000, "value": 0.7288},1089 {"time": 1229558400000, "value": 0.7074},1090 {"time": 1229644800000, "value": 0.6927},1091 {"time": 1229731200000, "value": 0.7083},1092 {"time": 1229817600000, "value": 0.7191},1093 {"time": 1229904000000, "value": 0.719},1094 {"time": 1229990400000, "value": 0.7153},1095 {"time": 1230076800000, "value": 0.7156},1096 {"time": 1230163200000, "value": 0.7158},1097 {"time": 1230249600000, "value": 0.714},1098 {"time": 1230336000000, "value": 0.7119},1099 {"time": 1230422400000, "value": 0.7129},1100 {"time": 1230508800000, "value": 0.7129},1101 {"time": 1230595200000, "value": 0.7049},1102 {"time": 1230681600000, "value": 0.7095}1103 ]...

Full Screen

Full Screen

test_time.py

Source:test_time.py Github

copy

Full Screen

1from test import support2import time3import unittest4import locale5import sysconfig6import sys7import platform8try:9 import threading10except ImportError:11 threading = None12# Max year is only limited by the size of C int.13SIZEOF_INT = sysconfig.get_config_var('SIZEOF_INT') or 414TIME_MAXYEAR = (1 << 8 * SIZEOF_INT - 1) - 115TIME_MINYEAR = -TIME_MAXYEAR - 116_PyTime_ROUND_DOWN = 017_PyTime_ROUND_UP = 118class TimeTestCase(unittest.TestCase):19 def setUp(self):20 self.t = time.time()21 def test_data_attributes(self):22 time.altzone23 time.daylight24 time.timezone25 time.tzname26 def test_time(self):27 time.time()28 info = time.get_clock_info('time')29 self.assertFalse(info.monotonic)30 self.assertTrue(info.adjustable)31 def test_clock(self):32 time.clock()33 info = time.get_clock_info('clock')34 self.assertTrue(info.monotonic)35 self.assertFalse(info.adjustable)36 @unittest.skipUnless(hasattr(time, 'clock_gettime'),37 'need time.clock_gettime()')38 def test_clock_realtime(self):39 time.clock_gettime(time.CLOCK_REALTIME)40 @unittest.skipUnless(hasattr(time, 'clock_gettime'),41 'need time.clock_gettime()')42 @unittest.skipUnless(hasattr(time, 'CLOCK_MONOTONIC'),43 'need time.CLOCK_MONOTONIC')44 def test_clock_monotonic(self):45 a = time.clock_gettime(time.CLOCK_MONOTONIC)46 b = time.clock_gettime(time.CLOCK_MONOTONIC)47 self.assertLessEqual(a, b)48 @unittest.skipUnless(hasattr(time, 'clock_getres'),49 'need time.clock_getres()')50 def test_clock_getres(self):51 res = time.clock_getres(time.CLOCK_REALTIME)52 self.assertGreater(res, 0.0)53 self.assertLessEqual(res, 1.0)54 @unittest.skipUnless(hasattr(time, 'clock_settime'),55 'need time.clock_settime()')56 def test_clock_settime(self):57 t = time.clock_gettime(time.CLOCK_REALTIME)58 try:59 time.clock_settime(time.CLOCK_REALTIME, t)60 except PermissionError:61 pass62 if hasattr(time, 'CLOCK_MONOTONIC'):63 self.assertRaises(OSError,64 time.clock_settime, time.CLOCK_MONOTONIC, 0)65 def test_conversions(self):66 self.assertEqual(time.ctime(self.t),67 time.asctime(time.localtime(self.t)))68 self.assertEqual(int(time.mktime(time.localtime(self.t))),69 int(self.t))70 def test_sleep(self):71 self.assertRaises(ValueError, time.sleep, -2)72 self.assertRaises(ValueError, time.sleep, -1)73 time.sleep(1.2)74 def test_strftime(self):75 tt = time.gmtime(self.t)76 for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I',77 'j', 'm', 'M', 'p', 'S',78 'U', 'w', 'W', 'x', 'X', 'y', 'Y', 'Z', '%'):79 format = ' %' + directive80 try:81 time.strftime(format, tt)82 except ValueError:83 self.fail('conversion specifier: %r failed.' % format)84 # Issue #10762: Guard against invalid/non-supported format string85 # so that Python don't crash (Windows crashes when the format string86 # input to [w]strftime is not kosher.87 if sys.platform.startswith('win'):88 with self.assertRaises(ValueError):89 time.strftime('%f')90 def _bounds_checking(self, func):91 # Make sure that strftime() checks the bounds of the various parts92 # of the time tuple (0 is valid for *all* values).93 # The year field is tested by other test cases above94 # Check month [1, 12] + zero support95 func((1900, 0, 1, 0, 0, 0, 0, 1, -1))96 func((1900, 12, 1, 0, 0, 0, 0, 1, -1))97 self.assertRaises(ValueError, func,98 (1900, -1, 1, 0, 0, 0, 0, 1, -1))99 self.assertRaises(ValueError, func,100 (1900, 13, 1, 0, 0, 0, 0, 1, -1))101 # Check day of month [1, 31] + zero support102 func((1900, 1, 0, 0, 0, 0, 0, 1, -1))103 func((1900, 1, 31, 0, 0, 0, 0, 1, -1))104 self.assertRaises(ValueError, func,105 (1900, 1, -1, 0, 0, 0, 0, 1, -1))106 self.assertRaises(ValueError, func,107 (1900, 1, 32, 0, 0, 0, 0, 1, -1))108 # Check hour [0, 23]109 func((1900, 1, 1, 23, 0, 0, 0, 1, -1))110 self.assertRaises(ValueError, func,111 (1900, 1, 1, -1, 0, 0, 0, 1, -1))112 self.assertRaises(ValueError, func,113 (1900, 1, 1, 24, 0, 0, 0, 1, -1))114 # Check minute [0, 59]115 func((1900, 1, 1, 0, 59, 0, 0, 1, -1))116 self.assertRaises(ValueError, func,117 (1900, 1, 1, 0, -1, 0, 0, 1, -1))118 self.assertRaises(ValueError, func,119 (1900, 1, 1, 0, 60, 0, 0, 1, -1))120 # Check second [0, 61]121 self.assertRaises(ValueError, func,122 (1900, 1, 1, 0, 0, -1, 0, 1, -1))123 # C99 only requires allowing for one leap second, but Python's docs say124 # allow two leap seconds (0..61)125 func((1900, 1, 1, 0, 0, 60, 0, 1, -1))126 func((1900, 1, 1, 0, 0, 61, 0, 1, -1))127 self.assertRaises(ValueError, func,128 (1900, 1, 1, 0, 0, 62, 0, 1, -1))129 # No check for upper-bound day of week;130 # value forced into range by a ``% 7`` calculation.131 # Start check at -2 since gettmarg() increments value before taking132 # modulo.133 self.assertEqual(func((1900, 1, 1, 0, 0, 0, -1, 1, -1)),134 func((1900, 1, 1, 0, 0, 0, +6, 1, -1)))135 self.assertRaises(ValueError, func,136 (1900, 1, 1, 0, 0, 0, -2, 1, -1))137 # Check day of the year [1, 366] + zero support138 func((1900, 1, 1, 0, 0, 0, 0, 0, -1))139 func((1900, 1, 1, 0, 0, 0, 0, 366, -1))140 self.assertRaises(ValueError, func,141 (1900, 1, 1, 0, 0, 0, 0, -1, -1))142 self.assertRaises(ValueError, func,143 (1900, 1, 1, 0, 0, 0, 0, 367, -1))144 def test_strftime_bounding_check(self):145 self._bounds_checking(lambda tup: time.strftime('', tup))146 def test_default_values_for_zero(self):147 # Make sure that using all zeros uses the proper default148 # values. No test for daylight savings since strftime() does149 # not change output based on its value and no test for year150 # because systems vary in their support for year 0.151 expected = "2000 01 01 00 00 00 1 001"152 with support.check_warnings():153 result = time.strftime("%Y %m %d %H %M %S %w %j", (2000,)+(0,)*8)154 self.assertEqual(expected, result)155 def test_strptime(self):156 # Should be able to go round-trip from strftime to strptime without157 # raising an exception.158 tt = time.gmtime(self.t)159 for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I',160 'j', 'm', 'M', 'p', 'S',161 'U', 'w', 'W', 'x', 'X', 'y', 'Y', 'Z', '%'):162 format = '%' + directive163 strf_output = time.strftime(format, tt)164 try:165 time.strptime(strf_output, format)166 except ValueError:167 self.fail("conversion specifier %r failed with '%s' input." %168 (format, strf_output))169 def test_strptime_bytes(self):170 # Make sure only strings are accepted as arguments to strptime.171 self.assertRaises(TypeError, time.strptime, b'2009', "%Y")172 self.assertRaises(TypeError, time.strptime, '2009', b'%Y')173 def test_strptime_exception_context(self):174 # check that this doesn't chain exceptions needlessly (see #17572)175 with self.assertRaises(ValueError) as e:176 time.strptime('', '%D')177 self.assertIs(e.exception.__suppress_context__, True)178 # additional check for IndexError branch (issue #19545)179 with self.assertRaises(ValueError) as e:180 time.strptime('19', '%Y %')181 self.assertIs(e.exception.__suppress_context__, True)182 def test_asctime(self):183 time.asctime(time.gmtime(self.t))184 # Max year is only limited by the size of C int.185 for bigyear in TIME_MAXYEAR, TIME_MINYEAR:186 asc = time.asctime((bigyear, 6, 1) + (0,) * 6)187 self.assertEqual(asc[-len(str(bigyear)):], str(bigyear))188 self.assertRaises(OverflowError, time.asctime,189 (TIME_MAXYEAR + 1,) + (0,) * 8)190 self.assertRaises(OverflowError, time.asctime,191 (TIME_MINYEAR - 1,) + (0,) * 8)192 self.assertRaises(TypeError, time.asctime, 0)193 self.assertRaises(TypeError, time.asctime, ())194 self.assertRaises(TypeError, time.asctime, (0,) * 10)195 def test_asctime_bounding_check(self):196 self._bounds_checking(time.asctime)197 def test_ctime(self):198 t = time.mktime((1973, 9, 16, 1, 3, 52, 0, 0, -1))199 self.assertEqual(time.ctime(t), 'Sun Sep 16 01:03:52 1973')200 t = time.mktime((2000, 1, 1, 0, 0, 0, 0, 0, -1))201 self.assertEqual(time.ctime(t), 'Sat Jan 1 00:00:00 2000')202 for year in [-100, 100, 1000, 2000, 2050, 10000]:203 try:204 testval = time.mktime((year, 1, 10) + (0,)*6)205 except (ValueError, OverflowError):206 # If mktime fails, ctime will fail too. This may happen207 # on some platforms.208 pass209 else:210 self.assertEqual(time.ctime(testval)[20:], str(year))211 @unittest.skipUnless(hasattr(time, "tzset"),212 "time module has no attribute tzset")213 def test_tzset(self):214 from os import environ215 # Epoch time of midnight Dec 25th 2002. Never DST in northern216 # hemisphere.217 xmas2002 = 1040774400.0218 # These formats are correct for 2002, and possibly future years219 # This format is the 'standard' as documented at:220 # http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html221 # They are also documented in the tzset(3) man page on most Unix222 # systems.223 eastern = 'EST+05EDT,M4.1.0,M10.5.0'224 victoria = 'AEST-10AEDT-11,M10.5.0,M3.5.0'225 utc='UTC+0'226 org_TZ = environ.get('TZ',None)227 try:228 # Make sure we can switch to UTC time and results are correct229 # Note that unknown timezones default to UTC.230 # Note that altzone is undefined in UTC, as there is no DST231 environ['TZ'] = eastern232 time.tzset()233 environ['TZ'] = utc234 time.tzset()235 self.assertEqual(236 time.gmtime(xmas2002), time.localtime(xmas2002)237 )238 self.assertEqual(time.daylight, 0)239 self.assertEqual(time.timezone, 0)240 self.assertEqual(time.localtime(xmas2002).tm_isdst, 0)241 # Make sure we can switch to US/Eastern242 environ['TZ'] = eastern243 time.tzset()244 self.assertNotEqual(time.gmtime(xmas2002), time.localtime(xmas2002))245 self.assertEqual(time.tzname, ('EST', 'EDT'))246 self.assertEqual(len(time.tzname), 2)247 self.assertEqual(time.daylight, 1)248 self.assertEqual(time.timezone, 18000)249 self.assertEqual(time.altzone, 14400)250 self.assertEqual(time.localtime(xmas2002).tm_isdst, 0)251 self.assertEqual(len(time.tzname), 2)252 # Now go to the southern hemisphere.253 environ['TZ'] = victoria254 time.tzset()255 self.assertNotEqual(time.gmtime(xmas2002), time.localtime(xmas2002))256 # Issue #11886: Australian Eastern Standard Time (UTC+10) is called257 # "EST" (as Eastern Standard Time, UTC-5) instead of "AEST"258 # (non-DST timezone), and "EDT" instead of "AEDT" (DST timezone),259 # on some operating systems (e.g. FreeBSD), which is wrong. See for260 # example this bug:261 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=93810262 self.assertIn(time.tzname[0], ('AEST' 'EST'), time.tzname[0])263 self.assertTrue(time.tzname[1] in ('AEDT', 'EDT'), str(time.tzname[1]))264 self.assertEqual(len(time.tzname), 2)265 self.assertEqual(time.daylight, 1)266 self.assertEqual(time.timezone, -36000)267 self.assertEqual(time.altzone, -39600)268 self.assertEqual(time.localtime(xmas2002).tm_isdst, 1)269 finally:270 # Repair TZ environment variable in case any other tests271 # rely on it.272 if org_TZ is not None:273 environ['TZ'] = org_TZ274 elif 'TZ' in environ:275 del environ['TZ']276 time.tzset()277 def test_insane_timestamps(self):278 # It's possible that some platform maps time_t to double,279 # and that this test will fail there. This test should280 # exempt such platforms (provided they return reasonable281 # results!).282 for func in time.ctime, time.gmtime, time.localtime:283 for unreasonable in -1e200, 1e200:284 self.assertRaises(OverflowError, func, unreasonable)285 def test_ctime_without_arg(self):286 # Not sure how to check the values, since the clock could tick287 # at any time. Make sure these are at least accepted and288 # don't raise errors.289 time.ctime()290 time.ctime(None)291 def test_gmtime_without_arg(self):292 gt0 = time.gmtime()293 gt1 = time.gmtime(None)294 t0 = time.mktime(gt0)295 t1 = time.mktime(gt1)296 self.assertAlmostEqual(t1, t0, delta=0.2)297 def test_localtime_without_arg(self):298 lt0 = time.localtime()299 lt1 = time.localtime(None)300 t0 = time.mktime(lt0)301 t1 = time.mktime(lt1)302 self.assertAlmostEqual(t1, t0, delta=0.2)303 def test_mktime(self):304 # Issue #1726687305 for t in (-2, -1, 0, 1):306 if sys.platform.startswith('aix') and t == -1:307 # Issue #11188, #19748: mktime() returns -1 on error. On Linux,308 # the tm_wday field is used as a sentinel () to detect if -1 is309 # really an error or a valid timestamp. On AIX, tm_wday is310 # unchanged even on success and so cannot be used as a311 # sentinel.312 continue313 try:314 tt = time.localtime(t)315 except (OverflowError, OSError):316 pass317 else:318 self.assertEqual(time.mktime(tt), t)319 # Issue #13309: passing extreme values to mktime() or localtime()320 # borks the glibc's internal timezone data.321 @unittest.skipUnless(platform.libc_ver()[0] != 'glibc',322 "disabled because of a bug in glibc. Issue #13309")323 def test_mktime_error(self):324 # It may not be possible to reliably make mktime return error325 # on all platfom. This will make sure that no other exception326 # than OverflowError is raised for an extreme value.327 tt = time.gmtime(self.t)328 tzname = time.strftime('%Z', tt)329 self.assertNotEqual(tzname, 'LMT')330 try:331 time.mktime((-1, 1, 1, 0, 0, 0, -1, -1, -1))332 except OverflowError:333 pass334 self.assertEqual(time.strftime('%Z', tt), tzname)335 @unittest.skipUnless(hasattr(time, 'monotonic'),336 'need time.monotonic')337 def test_monotonic(self):338 # monotonic() should not go backward339 times = [time.monotonic() for n in range(100)]340 t1 = times[0]341 for t2 in times[1:]:342 self.assertGreaterEqual(t2, t1, "times=%s" % times)343 t1 = t2344 # monotonic() includes time elapsed during a sleep345 t1 = time.monotonic()346 time.sleep(0.5)347 t2 = time.monotonic()348 dt = t2 - t1349 self.assertGreater(t2, t1)350 # Issue #20101: On some Windows machines, dt may be slightly low351 self.assertTrue(0.45 <= dt <= 1.0, dt)352 # monotonic() is a monotonic but non adjustable clock353 info = time.get_clock_info('monotonic')354 self.assertTrue(info.monotonic)355 self.assertFalse(info.adjustable)356 def test_perf_counter(self):357 time.perf_counter()358 def test_process_time(self):359 # process_time() should not include time spend during a sleep360 start = time.process_time()361 time.sleep(0.100)362 stop = time.process_time()363 # use 20 ms because process_time() has usually a resolution of 15 ms364 # on Windows365 self.assertLess(stop - start, 0.020)366 info = time.get_clock_info('process_time')367 self.assertTrue(info.monotonic)368 self.assertFalse(info.adjustable)369 @unittest.skipUnless(hasattr(time, 'monotonic'),370 'need time.monotonic')371 @unittest.skipUnless(hasattr(time, 'clock_settime'),372 'need time.clock_settime')373 def test_monotonic_settime(self):374 t1 = time.monotonic()375 realtime = time.clock_gettime(time.CLOCK_REALTIME)376 # jump backward with an offset of 1 hour377 try:378 time.clock_settime(time.CLOCK_REALTIME, realtime - 3600)379 except PermissionError as err:380 self.skipTest(err)381 t2 = time.monotonic()382 time.clock_settime(time.CLOCK_REALTIME, realtime)383 # monotonic must not be affected by system clock updates384 self.assertGreaterEqual(t2, t1)385 def test_localtime_failure(self):386 # Issue #13847: check for localtime() failure387 invalid_time_t = None388 for time_t in (-1, 2**30, 2**33, 2**60):389 try:390 time.localtime(time_t)391 except OverflowError:392 self.skipTest("need 64-bit time_t")393 except OSError:394 invalid_time_t = time_t395 break396 if invalid_time_t is None:397 self.skipTest("unable to find an invalid time_t value")398 self.assertRaises(OSError, time.localtime, invalid_time_t)399 self.assertRaises(OSError, time.ctime, invalid_time_t)400 def test_get_clock_info(self):401 clocks = ['clock', 'perf_counter', 'process_time', 'time']402 if hasattr(time, 'monotonic'):403 clocks.append('monotonic')404 for name in clocks:405 info = time.get_clock_info(name)406 #self.assertIsInstance(info, dict)407 self.assertIsInstance(info.implementation, str)408 self.assertNotEqual(info.implementation, '')409 self.assertIsInstance(info.monotonic, bool)410 self.assertIsInstance(info.resolution, float)411 # 0.0 < resolution <= 1.0412 self.assertGreater(info.resolution, 0.0)413 self.assertLessEqual(info.resolution, 1.0)414 self.assertIsInstance(info.adjustable, bool)415 self.assertRaises(ValueError, time.get_clock_info, 'xxx')416class TestLocale(unittest.TestCase):417 def setUp(self):418 self.oldloc = locale.setlocale(locale.LC_ALL)419 def tearDown(self):420 locale.setlocale(locale.LC_ALL, self.oldloc)421 def test_bug_3061(self):422 try:423 tmp = locale.setlocale(locale.LC_ALL, "fr_FR")424 except locale.Error:425 self.skipTest('could not set locale.LC_ALL to fr_FR')426 # This should not cause an exception427 time.strftime("%B", (2009,2,1,0,0,0,0,0,0))428class _TestAsctimeYear:429 _format = '%d'430 def yearstr(self, y):431 return time.asctime((y,) + (0,) * 8).split()[-1]432 def test_large_year(self):433 # Check that it doesn't crash for year > 9999434 self.assertEqual(self.yearstr(12345), '12345')435 self.assertEqual(self.yearstr(123456789), '123456789')436class _TestStrftimeYear:437 # Issue 13305: For years < 1000, the value is not always438 # padded to 4 digits across platforms. The C standard439 # assumes year >= 1900, so it does not specify the number440 # of digits.441 if time.strftime('%Y', (1,) + (0,) * 8) == '0001':442 _format = '%04d'443 else:444 _format = '%d'445 def yearstr(self, y):446 return time.strftime('%Y', (y,) + (0,) * 8)447 def test_4dyear(self):448 # Check that we can return the zero padded value.449 if self._format == '%04d':450 self.test_year('%04d')451 else:452 def year4d(y):453 return time.strftime('%4Y', (y,) + (0,) * 8)454 self.test_year('%04d', func=year4d)455 def skip_if_not_supported(y):456 msg = "strftime() is limited to [1; 9999] with Visual Studio"457 # Check that it doesn't crash for year > 9999458 try:459 time.strftime('%Y', (y,) + (0,) * 8)460 except ValueError:461 cond = False462 else:463 cond = True464 return unittest.skipUnless(cond, msg)465 @skip_if_not_supported(10000)466 def test_large_year(self):467 return super().test_large_year()468 @skip_if_not_supported(0)469 def test_negative(self):470 return super().test_negative()471 del skip_if_not_supported472class _Test4dYear:473 _format = '%d'474 def test_year(self, fmt=None, func=None):475 fmt = fmt or self._format476 func = func or self.yearstr477 self.assertEqual(func(1), fmt % 1)478 self.assertEqual(func(68), fmt % 68)479 self.assertEqual(func(69), fmt % 69)480 self.assertEqual(func(99), fmt % 99)481 self.assertEqual(func(999), fmt % 999)482 self.assertEqual(func(9999), fmt % 9999)483 def test_large_year(self):484 self.assertEqual(self.yearstr(12345), '12345')485 self.assertEqual(self.yearstr(123456789), '123456789')486 self.assertEqual(self.yearstr(TIME_MAXYEAR), str(TIME_MAXYEAR))487 self.assertRaises(OverflowError, self.yearstr, TIME_MAXYEAR + 1)488 def test_negative(self):489 self.assertEqual(self.yearstr(-1), self._format % -1)490 self.assertEqual(self.yearstr(-1234), '-1234')491 self.assertEqual(self.yearstr(-123456), '-123456')492 self.assertEqual(self.yearstr(-123456789), str(-123456789))493 self.assertEqual(self.yearstr(-1234567890), str(-1234567890))494 self.assertEqual(self.yearstr(TIME_MINYEAR + 1900), str(TIME_MINYEAR + 1900))495 # Issue #13312: it may return wrong value for year < TIME_MINYEAR + 1900496 # Skip the value test, but check that no error is raised497 self.yearstr(TIME_MINYEAR)498 # self.assertEqual(self.yearstr(TIME_MINYEAR), str(TIME_MINYEAR))499 self.assertRaises(OverflowError, self.yearstr, TIME_MINYEAR - 1)500class TestAsctime4dyear(_TestAsctimeYear, _Test4dYear, unittest.TestCase):501 pass502class TestStrftime4dyear(_TestStrftimeYear, _Test4dYear, unittest.TestCase):503 pass504class TestPytime(unittest.TestCase):505 def setUp(self):506 self.invalid_values = (507 -(2 ** 100), 2 ** 100,508 -(2.0 ** 100.0), 2.0 ** 100.0,509 )510 @support.cpython_only511 def test_time_t(self):512 from _testcapi import pytime_object_to_time_t513 for obj, time_t, rnd in (514 # Round towards zero515 (0, 0, _PyTime_ROUND_DOWN),516 (-1, -1, _PyTime_ROUND_DOWN),517 (-1.0, -1, _PyTime_ROUND_DOWN),518 (-1.9, -1, _PyTime_ROUND_DOWN),519 (1.0, 1, _PyTime_ROUND_DOWN),520 (1.9, 1, _PyTime_ROUND_DOWN),521 # Round away from zero522 (0, 0, _PyTime_ROUND_UP),523 (-1, -1, _PyTime_ROUND_UP),524 (-1.0, -1, _PyTime_ROUND_UP),525 (-1.9, -2, _PyTime_ROUND_UP),526 (1.0, 1, _PyTime_ROUND_UP),527 (1.9, 2, _PyTime_ROUND_UP),528 ):529 self.assertEqual(pytime_object_to_time_t(obj, rnd), time_t)530 rnd = _PyTime_ROUND_DOWN531 for invalid in self.invalid_values:532 self.assertRaises(OverflowError,533 pytime_object_to_time_t, invalid, rnd)534 @support.cpython_only535 def test_timeval(self):536 from _testcapi import pytime_object_to_timeval537 for obj, timeval, rnd in (538 # Round towards zero539 (0, (0, 0), _PyTime_ROUND_DOWN),540 (-1, (-1, 0), _PyTime_ROUND_DOWN),541 (-1.0, (-1, 0), _PyTime_ROUND_DOWN),542 (1e-6, (0, 1), _PyTime_ROUND_DOWN),543 (1e-7, (0, 0), _PyTime_ROUND_DOWN),544 (-1e-6, (-1, 999999), _PyTime_ROUND_DOWN),545 (-1e-7, (-1, 999999), _PyTime_ROUND_DOWN),546 (-1.2, (-2, 800000), _PyTime_ROUND_DOWN),547 (0.9999999, (0, 999999), _PyTime_ROUND_DOWN),548 (0.0000041, (0, 4), _PyTime_ROUND_DOWN),549 (1.1234560, (1, 123456), _PyTime_ROUND_DOWN),550 (1.1234569, (1, 123456), _PyTime_ROUND_DOWN),551 (-0.0000040, (-1, 999996), _PyTime_ROUND_DOWN),552 (-0.0000041, (-1, 999995), _PyTime_ROUND_DOWN),553 (-1.1234560, (-2, 876544), _PyTime_ROUND_DOWN),554 (-1.1234561, (-2, 876543), _PyTime_ROUND_DOWN),555 # Round away from zero556 (0, (0, 0), _PyTime_ROUND_UP),557 (-1, (-1, 0), _PyTime_ROUND_UP),558 (-1.0, (-1, 0), _PyTime_ROUND_UP),559 (1e-6, (0, 1), _PyTime_ROUND_UP),560 (1e-7, (0, 1), _PyTime_ROUND_UP),561 (-1e-6, (-1, 999999), _PyTime_ROUND_UP),562 (-1e-7, (-1, 999999), _PyTime_ROUND_UP),563 (-1.2, (-2, 800000), _PyTime_ROUND_UP),564 (0.9999999, (1, 0), _PyTime_ROUND_UP),565 (0.0000041, (0, 5), _PyTime_ROUND_UP),566 (1.1234560, (1, 123457), _PyTime_ROUND_UP),567 (1.1234569, (1, 123457), _PyTime_ROUND_UP),568 (-0.0000040, (-1, 999996), _PyTime_ROUND_UP),569 (-0.0000041, (-1, 999995), _PyTime_ROUND_UP),570 (-1.1234560, (-2, 876544), _PyTime_ROUND_UP),571 (-1.1234561, (-2, 876543), _PyTime_ROUND_UP),572 ):573 with self.subTest(obj=obj, round=rnd, timeval=timeval):574 self.assertEqual(pytime_object_to_timeval(obj, rnd), timeval)575 rnd = _PyTime_ROUND_DOWN576 for invalid in self.invalid_values:577 self.assertRaises(OverflowError,578 pytime_object_to_timeval, invalid, rnd)579 @support.cpython_only580 def test_timespec(self):581 from _testcapi import pytime_object_to_timespec582 for obj, timespec, rnd in (583 # Round towards zero584 (0, (0, 0), _PyTime_ROUND_DOWN),585 (-1, (-1, 0), _PyTime_ROUND_DOWN),586 (-1.0, (-1, 0), _PyTime_ROUND_DOWN),587 (1e-9, (0, 1), _PyTime_ROUND_DOWN),588 (1e-10, (0, 0), _PyTime_ROUND_DOWN),589 (-1e-9, (-1, 999999999), _PyTime_ROUND_DOWN),590 (-1e-10, (-1, 999999999), _PyTime_ROUND_DOWN),591 (-1.2, (-2, 800000000), _PyTime_ROUND_DOWN),592 (0.9999999999, (0, 999999999), _PyTime_ROUND_DOWN),593 (1.1234567890, (1, 123456789), _PyTime_ROUND_DOWN),594 (1.1234567899, (1, 123456789), _PyTime_ROUND_DOWN),595 (-1.1234567890, (-2, 876543211), _PyTime_ROUND_DOWN),596 (-1.1234567891, (-2, 876543210), _PyTime_ROUND_DOWN),597 # Round away from zero598 (0, (0, 0), _PyTime_ROUND_UP),599 (-1, (-1, 0), _PyTime_ROUND_UP),600 (-1.0, (-1, 0), _PyTime_ROUND_UP),601 (1e-9, (0, 1), _PyTime_ROUND_UP),602 (1e-10, (0, 1), _PyTime_ROUND_UP),603 (-1e-9, (-1, 999999999), _PyTime_ROUND_UP),604 (-1e-10, (-1, 999999999), _PyTime_ROUND_UP),605 (-1.2, (-2, 800000000), _PyTime_ROUND_UP),606 (0.9999999999, (1, 0), _PyTime_ROUND_UP),607 (1.1234567890, (1, 123456790), _PyTime_ROUND_UP),608 (1.1234567899, (1, 123456790), _PyTime_ROUND_UP),609 (-1.1234567890, (-2, 876543211), _PyTime_ROUND_UP),610 (-1.1234567891, (-2, 876543210), _PyTime_ROUND_UP),611 ):612 with self.subTest(obj=obj, round=rnd, timespec=timespec):613 self.assertEqual(pytime_object_to_timespec(obj, rnd), timespec)614 rnd = _PyTime_ROUND_DOWN615 for invalid in self.invalid_values:616 self.assertRaises(OverflowError,617 pytime_object_to_timespec, invalid, rnd)618 @unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support")619 def test_localtime_timezone(self):620 # Get the localtime and examine it for the offset and zone.621 lt = time.localtime()622 self.assertTrue(hasattr(lt, "tm_gmtoff"))623 self.assertTrue(hasattr(lt, "tm_zone"))624 # See if the offset and zone are similar to the module625 # attributes.626 if lt.tm_gmtoff is None:627 self.assertTrue(not hasattr(time, "timezone"))628 else:629 self.assertEqual(lt.tm_gmtoff, -[time.timezone, time.altzone][lt.tm_isdst])630 if lt.tm_zone is None:631 self.assertTrue(not hasattr(time, "tzname"))632 else:633 self.assertEqual(lt.tm_zone, time.tzname[lt.tm_isdst])634 # Try and make UNIX times from the localtime and a 9-tuple635 # created from the localtime. Test to see that the times are636 # the same.637 t = time.mktime(lt); t9 = time.mktime(lt[:9])638 self.assertEqual(t, t9)639 # Make localtimes from the UNIX times and compare them to640 # the original localtime, thus making a round trip.641 new_lt = time.localtime(t); new_lt9 = time.localtime(t9)642 self.assertEqual(new_lt, lt)643 self.assertEqual(new_lt.tm_gmtoff, lt.tm_gmtoff)644 self.assertEqual(new_lt.tm_zone, lt.tm_zone)645 self.assertEqual(new_lt9, lt)646 self.assertEqual(new_lt.tm_gmtoff, lt.tm_gmtoff)647 self.assertEqual(new_lt9.tm_zone, lt.tm_zone)648 @unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support")649 def test_strptime_timezone(self):650 t = time.strptime("UTC", "%Z")651 self.assertEqual(t.tm_zone, 'UTC')652 t = time.strptime("+0500", "%z")653 self.assertEqual(t.tm_gmtoff, 5 * 3600)654 @unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support")655 def test_short_times(self):656 import pickle657 # Load a short time structure using pickle.658 st = b"ctime\nstruct_time\np0\n((I2007\nI8\nI11\nI1\nI24\nI49\nI5\nI223\nI1\ntp1\n(dp2\ntp3\nRp4\n."659 lt = pickle.loads(st)660 self.assertIs(lt.tm_gmtoff, None)661 self.assertIs(lt.tm_zone, None)662if __name__ == "__main__":...

Full Screen

Full Screen

ReactFiberPendingPriority.js

Source:ReactFiberPendingPriority.js Github

copy

Full Screen

...208 earliestExpirationTime = earliestSuspendedTime;209 }210 return earliestExpirationTime;211}212export function didExpireAtExpirationTime(213 root: FiberRoot,214 currentTime: ExpirationTime,215): void {216 const expirationTime = root.expirationTime;217 if (expirationTime !== NoWork && currentTime <= expirationTime) {218 // The root has expired. Flush all work up to the current time.219 root.nextExpirationTimeToWorkOn = currentTime;220 }221}222function findNextExpirationTimeToWorkOn(completedExpirationTime, root) {223 const earliestSuspendedTime = root.earliestSuspendedTime;224 const latestSuspendedTime = root.latestSuspendedTime;225 const earliestPendingTime = root.earliestPendingTime;226 const latestPingedTime = root.latestPingedTime;...

Full Screen

Full Screen

ionic-timepicker.directive.js

Source:ionic-timepicker.directive.js Github

copy

Full Screen

1//By Rajeshwar Patlolla2//https://github.com/rajeshwarpatlolla3(function () {4 'use strict';5 angular.module('ionic-timepicker')6 .directive('ionicTimepicker', ionicTimepicker);7 ionicTimepicker.$inject = ['$ionicPopup'];8 function ionicTimepicker($ionicPopup) {9 return {10 restrict: 'AE',11 replace: true,12 scope: {13 inputObj: "=inputObj"14 },15 link: function (scope, element, attrs) {16 var today = new Date();17 var currentEpoch = ((new Date()).getHours() * 60 * 60) + ((new Date()).getMinutes() * 60);18 //set up base variables and options for customization19 scope.inputEpochTime = scope.inputObj.inputEpochTime ? scope.inputObj.inputEpochTime : currentEpoch;20 scope.step = scope.inputObj.step ? scope.inputObj.step : 15;21 scope.format = scope.inputObj.format ? scope.inputObj.format : 24;22 scope.titleLabel = scope.inputObj.titleLabel ? scope.inputObj.titleLabel : 'Time Picker';23 scope.setLabel = scope.inputObj.setLabel ? scope.inputObj.setLabel : 'Set';24 scope.closeLabel = scope.inputObj.closeLabel ? scope.inputObj.closeLabel : 'Close';25 scope.setButtonType = scope.inputObj.setButtonType ? scope.inputObj.setButtonType : 'button-positive';26 scope.closeButtonType = scope.inputObj.closeButtonType ? scope.inputObj.closeButtonType : 'button-stable';27 var obj = {epochTime: scope.inputEpochTime, step: scope.step, format: scope.format};28 scope.time = {hours: 0, minutes: 0, meridian: ""};29 var objDate = new Date(obj.epochTime * 1000); // Epoch time in milliseconds.30 //Increasing the hours31 scope.increaseHours = function () {32 scope.time.hours = Number(scope.time.hours);33 if (obj.format == 12) {34 if (scope.time.hours != 12) {35 scope.time.hours += 1;36 } else {37 scope.time.hours = 1;38 }39 }40 if (obj.format == 24) {41 scope.time.hours = (scope.time.hours + 1) % 24;42 }43 scope.time.hours = (scope.time.hours < 10) ? ('0' + scope.time.hours) : scope.time.hours;44 };45 //Decreasing the hours46 scope.decreaseHours = function () {47 scope.time.hours = Number(scope.time.hours);48 if (obj.format == 12) {49 if (scope.time.hours > 1) {50 scope.time.hours -= 1;51 } else {52 scope.time.hours = 12;53 }54 }55 if (obj.format == 24) {56 scope.time.hours = (scope.time.hours + 23) % 24;57 }58 scope.time.hours = (scope.time.hours < 10) ? ('0' + scope.time.hours) : scope.time.hours;59 };60 //Increasing the minutes61 scope.increaseMinutes = function () {62 scope.time.minutes = Number(scope.time.minutes);63 scope.time.minutes = (scope.time.minutes + obj.step) % 60;64 scope.time.minutes = (scope.time.minutes < 10) ? ('0' + scope.time.minutes) : scope.time.minutes;65 };66 //Decreasing the minutes67 scope.decreaseMinutes = function () {68 scope.time.minutes = Number(scope.time.minutes);69 scope.time.minutes = (scope.time.minutes + (60 - obj.step)) % 60;70 scope.time.minutes = (scope.time.minutes < 10) ? ('0' + scope.time.minutes) : scope.time.minutes;71 };72 //Changing the meridian73 scope.changeMeridian = function () {74 scope.time.meridian = (scope.time.meridian === "AM") ? "PM" : "AM";75 };76 //onclick of the button77 element.on("click", function () {78 if (typeof scope.inputObj.inputEpochTime === 'undefined' || scope.inputObj.inputEpochTime === null) {79 objDate = new Date();80 } else {81 objDate = new Date(scope.inputObj.inputEpochTime * 1000);82 }83 if (obj.format == 12) {84 scope.time.meridian = (objDate.getUTCHours() >= 12) ? "PM" : "AM";85 scope.time.hours = (objDate.getUTCHours() > 12) ? ((objDate.getUTCHours() - 12)) : (objDate.getUTCHours());86 scope.time.minutes = (objDate.getUTCMinutes());87 scope.time.hours = (scope.time.hours < 10) ? ("0" + scope.time.hours) : (scope.time.hours);88 scope.time.minutes = (scope.time.minutes < 10) ? ("0" + scope.time.minutes) : (scope.time.minutes);89 if (scope.time.hours === 0 && scope.time.meridian === "AM") {90 scope.time.hours = 12;91 }92 $ionicPopup.show({93 templateUrl: 'ionic-timepicker-12-hour.html',94 title: scope.titleLabel,95 subTitle: '',96 scope: scope,97 buttons: [98 {99 text: scope.closeLabel,100 type: scope.closeButtonType,101 onTap: function (e) {102 scope.inputObj.callback(undefined);103 }104 },105 {106 text: scope.setLabel,107 type: scope.setButtonType,108 onTap: function (e) {109 scope.loadingContent = true;110 var totalSec = 0;111 if (scope.time.hours != 12) {112 totalSec = (scope.time.hours * 60 * 60) + (scope.time.minutes * 60);113 } else {114 totalSec = scope.time.minutes * 60;115 }116 if (scope.time.meridian === "AM") {117 totalSec += 0;118 } else if (scope.time.meridian === "PM") {119 totalSec += 43200;120 }121 scope.etime = totalSec;122 scope.inputObj.callback(scope.etime);123 }124 }125 ]126 });127 } else if (obj.format == 24) {128 scope.time.hours = (objDate.getUTCHours());129 scope.time.minutes = (objDate.getUTCMinutes());130 scope.time.hours = (scope.time.hours < 10) ? ("0" + scope.time.hours) : (scope.time.hours);131 scope.time.minutes = (scope.time.minutes < 10) ? ("0" + scope.time.minutes) : (scope.time.minutes);132 $ionicPopup.show({133 templateUrl: 'ionic-timepicker-24-hour.html',134 title: scope.titleLabel,135 subTitle: '',136 scope: scope,137 buttons: [138 {139 text: scope.closeLabel,140 type: scope.closeButtonType,141 onTap: function (e) {142 scope.inputObj.callback(undefined);143 }144 },145 {146 text: scope.setLabel,147 type: scope.setButtonType,148 onTap: function (e) {149 scope.loadingContent = true;150 var totalSec = 0;151 if (scope.time.hours != 24) {152 totalSec = (scope.time.hours * 60 * 60) + (scope.time.minutes * 60);153 } else {154 totalSec = scope.time.minutes * 60;155 }156 scope.etime = totalSec;157 scope.inputObj.callback(scope.etime);158 }159 }160 ]161 });162 }163 });164 }165 };166 }...

Full Screen

Full Screen

time_util.js

Source:time_util.js Github

copy

Full Screen

...27 *28 * @param {string} timeTicks A time represented in "time ticks".29 * @return {number} The Javascript time that |timeTicks| represents.30 */31 function convertTimeTicksToTime(timeTicks) {32 return timeTickOffset + (timeTicks - 0);33 }34 /**35 * The browser gives us times in terms of "time ticks" in milliseconds.36 * This function converts the tick count to a Date() object.37 *38 * @param {string} timeTicks A time represented in "time ticks".39 * @return {Date} The time that |timeTicks| represents.40 */41 function convertTimeTicksToDate(timeTicks) {42 return new Date(convertTimeTicksToTime(timeTicks));43 }44 /**45 * Returns the current time.46 *47 * @return {number} Milliseconds since the Unix epoch.48 */49 function getCurrentTime() {50 return Date.now();51 }52 /**53 * Returns the curent time in time ticks.54 *55 * @return {number} Current time, in TimeTicks.56 */57 function getCurrentTimeTicks() {58 return getCurrentTime() - timeTickOffset;59 }60 /**61 * Sets the base time more friendly display.62 *63 * @param {string} firstEventTime The time of the first event, as a Javascript64 * numeric time. Other times can be displayed relative to this time.65 */66 function setBaseTime(firstEventTime) {67 baseTime = firstEventTime;68 }69 /**70 * Sets the base time more friendly display.71 *72 * @return {number} Time set by setBaseTime, or 0 if no time has been set.73 */74 function getBaseTime() {75 return baseTime;76 }77 /**78 * Clears the base time, so isBaseTimeSet() returns 0.79 */80 function clearBaseTime() {81 baseTime = 0;82 }83 /**84 * Returns true if the base time has been initialized.85 *86 * @return {bool} True if the base time is set.87 */88 function isBaseTimeSet() {89 return baseTime != 0;90 }91 /**92 * Takes in a "time ticks" and returns it as a time since the base time, in93 * milliseconds.94 *95 * @param {string} timeTicks A time represented in "time ticks".96 * @return {number} Milliseconds since the base time.97 */98 function convertTimeTicksToRelativeTime(timeTicks) {99 return convertTimeTicksToTime(timeTicks) - baseTime;100 }101 /**102 * Adds an HTML representation of |date| to |parentNode|.103 *104 * @param {DomNode} parentNode The node that will contain the new node.105 * @param {Date} date The date to be displayed.106 * @return {DomNode} The new node containing the date/time.107 */108 function addNodeWithDate(parentNode, date) {109 var span = addNodeWithText(parentNode, 'span', dateToString(date));110 span.title = 't=' + date.getTime();111 return span;112 }113 /**114 * Returns a string representation of |date|.115 *116 * @param {Date} date The date to be represented.117 * @return {string} A string representation of |date|.118 */119 function dateToString(date) {120 var dateStr = date.getFullYear() + '-' +121 zeroPad_(date.getMonth() + 1, 2) + '-' +122 zeroPad_(date.getDate(), 2);123 var timeStr = zeroPad_(date.getHours(), 2) + ':' +124 zeroPad_(date.getMinutes(), 2) + ':' +...

Full Screen

Full Screen

test_file.py

Source:test_file.py Github

copy

Full Screen

1from time import sleep2TIME = 0.13def test_a_1():4 sleep(TIME)5def test_a_2():6 sleep(TIME)7def test_a_3():8 sleep(TIME)9def test_a_4():10 sleep(TIME)11def test_a_5():12 sleep(TIME)13def test_a_6():14 sleep(TIME)15def test_a_7():16 sleep(TIME)17def test_a_8():18 sleep(TIME)19def test_a_9():20 sleep(TIME)21def test_a_10():22 sleep(TIME)23def test_a_11():24 sleep(TIME)25def test_a_12():26 sleep(TIME)27# def test_a_13():28# sleep(TIME)29#30#31# def test_a_14():32# sleep(TIME)33#34#35# def test_a_15():36# sleep(TIME)37#38#39# def test_a_16():40# sleep(TIME)41#42#43# def test_a_17():44# sleep(TIME)45#46#47# def test_a_18():48# sleep(TIME)49#50#51# def test_a_19():52# sleep(TIME)53#54#55# def test_a_20():56# sleep(TIME)57#58#59# def test_a_21():60# sleep(TIME)61#62#63# def test_a_22():64# sleep(TIME)65#66#67# def test_a_23():68# sleep(TIME)69#70#71# def test_a_24():72# sleep(TIME)73#74#75# def test_a_25():76# sleep(TIME)77#78#79# def test_a_26():80# sleep(TIME)81#82#83# def test_a_27():84# sleep(TIME)85#86#87# def test_a_28():88# sleep(TIME)89#90#91# def test_a_29():92# sleep(TIME)93#94#95# def test_a_30():96# sleep(TIME)97#98#99# def test_a_31():100# sleep(TIME)101#102#103# def test_a_32():104# sleep(TIME)105#106#107# def test_a_33():108# sleep(TIME)109#110#111# def test_a_34():112# sleep(TIME)113#114#115# def test_a_35():116# sleep(TIME)117#118#119# def test_a_36():120# sleep(TIME)121#122#123# def test_a_37():124# sleep(TIME)125#126#127# def test_a_38():128# sleep(TIME)129#130#131# def test_a_39():132# sleep(TIME)133#134#135# def test_a_40():136# sleep(TIME)137#138#139# def test_a_41():140# sleep(TIME)141#142#143# def test_a_42():144# sleep(TIME)145#146#147# def test_a_43():148# sleep(TIME)149#150#151# def test_a_44():152# sleep(TIME)153#154#155# def test_a_45():156# sleep(TIME)157#158#159# def test_a_46():160# sleep(TIME)161#162#163# def test_a_47():164# sleep(TIME)165#166#167# def test_a_48():168# sleep(TIME)169#170#171# def test_a_49():172# sleep(TIME)173#174#175# def test_a_50():176# sleep(TIME)177#178#179# def test_a_51():180# sleep(TIME)181#182#183# def test_a_52():184# sleep(TIME)185#186#187# def test_a_53():188# sleep(TIME)189#190#191# def test_a_54():192# sleep(TIME)193#194#195# def test_a_55():196# sleep(TIME)197#198#199# def test_a_56():200# sleep(TIME)201#202#203# def test_a_57():204# sleep(TIME)205#206#207# def test_a_58():208# sleep(TIME)209#210#211# def test_a_59():212# sleep(TIME)213#214#215# def test_a_60():216# sleep(TIME)217#218#219# def test_a_61():220# sleep(TIME)221#222#223# def test_a_62():224# sleep(TIME)225#226#227# def test_a_63():228# sleep(TIME)229#230#231# def test_a_64():232# sleep(TIME)233#234#235# def test_a_65():236# sleep(TIME)237#238#239# def test_a_66():240# sleep(TIME)241#242#243# def test_a_67():244# sleep(TIME)245#246#247# def test_a_68():248# sleep(TIME)249#250#251# def test_a_69():252# sleep(TIME)253#254#255# def test_a_70():256# sleep(TIME)257#258#259# def test_a_71():260# sleep(TIME)261#262#263# def test_a_72():264# sleep(TIME)265#266#267# def test_a_73():268# sleep(TIME)269#270#271# def test_a_74():272# sleep(TIME)273#274#275# def test_a_75():276# sleep(TIME)277#278#279# def test_a_76():280# sleep(TIME)281#282#283# def test_a_77():284# sleep(TIME)285#286#287# def test_a_78():288# sleep(TIME)289#290#291# def test_a_79():292# sleep(TIME)293#294#295# def test_a_80():296# sleep(TIME)297#298#299# def test_a_81():300# sleep(TIME)301#302#303# def test_a_82():304# sleep(TIME)305#306#307# def test_a_83():308# sleep(TIME)309#310#311# def test_a_84():312# sleep(TIME)313#314#315# def test_a_85():316# sleep(TIME)317#318#319# def test_a_86():320# sleep(TIME)321#322#323# def test_a_87():324# sleep(TIME)325#326#327# def test_a_88():328# sleep(TIME)329#330#331# def test_a_89():332# sleep(TIME)333#334#335# def test_a_90():336# sleep(TIME)337#338#339# def test_a_91():340# sleep(TIME)341#342#343# def test_a_92():344# sleep(TIME)345#346#347# def test_a_93():348# sleep(TIME)349#350#351# def test_a_94():352# sleep(TIME)353#354#355# def test_a_95():356# sleep(TIME)357#358#359# def test_a_96():360# sleep(TIME)361#362#363# def test_a_97():364# sleep(TIME)365#366#367# def test_a_98():368# sleep(TIME)369#370#371# def test_a_99():372# sleep(TIME)373#374#375# def test_a_100():...

Full Screen

Full Screen

callbacks.py

Source:callbacks.py Github

copy

Full Screen

1import time2import collections3from lightgbm.callback import EarlyStopException4#class EarlyStopException(Exception):5# def __init__(self, current_iteration, time_for_each_iteration):6# super(EarlyStopException, self).__init__()7# self.current_iteration = current_iteration8# Callback environment used by callbacks9CallbackEnv = collections.namedtuple(10 "LightGBMCallbackEnv",11 ["model",12 "params",13 "iteration",14 "begin_iteration",15 "end_iteration",16 "evaluation_result_list"])17def early_stopping_with_time_budget(config, reserved_time=None, reserved_time_ratio=10.0):18 time_for_each_iteration=list()19 start_time = list()20 validation_time_for_each_iteration=list()21 def _callback(env):22 if len(start_time) == 0:23 start_time.append(time.time())24 elif len(time_for_each_iteration) == 0:25 time_for_each_iteration.append(time.time() - start_time[0])26 start_time[0] = time.time()27 print("time for each iteration is %f"%time_for_each_iteration[0])28 #elif len(validation_time_for_each_iteration) == 0 and len(env.evaluation_result_list)>1:29 # validation_time_for_each_iteration.append(time.time() - start_time[0])30 # print("all time is %f"%validation_time_for_each_iteration[0])31 # print("time for each evaluation is %f"%(validation_time_for_each_iteration[0]-100*time_for_each_iteration[0]))32 else:33 time_for_each_iteration.append(time.time() - start_time[0])34 start_time[0] = time.time()35 if env.iteration%100 == 0:36 print("time for the current iteration is %f"%time_for_each_iteration[-1])37 if reserved_time is None:38 if config.time_left() < (env.iteration+1)*time_for_each_iteration[0]/3.0:39 raise EarlyStopException(env.iteration, env.evaluation_result_list)40 else:41 if config.time_left() < reserved_time:42 print("Time is not enough. The reserved time for post process is %d"%reserved_time)43 raise EarlyStopException(env.iteration, env.evaluation_result_list)44 #print(iteration)45 #if iteration>0 and iteration%100==0:46 # print("all time is %f"%validation_time_for_each_iteration[0])47 # print("time for each evaluation is %f"%(validation_time_for_each_iteration[0]-100*time_for_each_iteration[0]))48 #print("The number of evaluation results: %d"%len(env.evaluation_result_list))49 #print(env.evaluation_result_list)50 _callback.order = 40...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var argosyTime = require('argosy-time')3var argosyPatterns = require('argosy-patterns')4var patterns = argosyPatterns()5var time = argosyTime()6var argosyService = argosy({7})8argosyService.pipe(argosyTime()).pipe(argosyService)9argosyService.accept({10 getTime: patterns.value({})11}).process(function (msg, respond) {12 argosyService.time(function (err, time) {13 respond(null, time)14 })15})16argosyService.listen()17argosyService.act('getTime', function (err, time) {18 console.log(time)19})20var argosy = require('argosy')21var argosyTime = require('argosy-time')22var argosyPatterns = require('argosy-patterns')23var patterns = argosyPatterns()24var time = argosyTime()25var argosyService = argosy({26})27argosyService.pipe(argosyTime()).pipe(argosyService)28argosyService.accept({29 getTime: patterns.value({})30}).process(function (msg, respond) {31 argosyService.time(function (err, time) {32 respond(null, time)33 })34})35argosyService.listen()36argosyService.act('getTime', function (err, time) {37 console.log(time)38})39var argosy = require('argosy')40var argosyTime = require('argosy-time')41var argosyPatterns = require('argosy-patterns')42var patterns = argosyPatterns()43var time = argosyTime()44var argosyService = argosy({45})46argosyService.pipe(argosyTime()).pipe(argosyService)47argosyService.accept({48 getTime: patterns.value({})49}).process(function (msg, respond) {50 argosyService.time(function (err, time) {51 respond(null, time)52 })53})54argosyService.listen()55argosyService.act('getTime', function (err

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var time = require('argosy-pattern/time')3var patterns = require('argosy-pattern/patterns')4var argosyService = argosy()5argosyService.pipe(argosyService)6argosyService.accept({7})8 .use(time())9 .use(function (request, next) {10 next(null, request.get)11 })12 .forward(argosyService)13var argosyClient = require('argosy-client')14var time = require('argosy-pattern/time')15var patterns = require('argosy-pattern/patterns')16var client = argosyClient()17client.pipe(client)18client.accept({19})20 .use(time())21 .use(function (request, next) {22 next(null, request.get)23 })24 .forward(client)25var argosyHttp = require('argosy-http')26var time = require('argosy-pattern/time')27var patterns = require('argosy-pattern/patterns')28var httpService = argosyHttp()29httpService.pipe(httpService)30httpService.accept({31})32 .use(time())33 .use(function (request, next) {34 next(null, request.get)35 })36 .forward(httpService)37var argosyHttpClient = require('argosy-http-client')38var time = require('argosy-pattern/time')39var patterns = require('argosy-pattern/patterns')40var httpClient = argosyHttpClient()41httpClient.pipe(httpClient)42httpClient.accept({43})44 .use(time())45 .use(function (request, next) {46 next(null, request.get)47 })48 .forward(httpClient)49var argosySocketIo = require('argosy-socket.io')50var time = require('argosy-pattern/time')51var patterns = require('argosy-pattern/patterns')52var socketIoService = argosySocketIo()53socketIoService.pipe(socketIoService)54socketIoService.accept({55})

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var argosyTime = require('argosy-time')3var timeService = argosy()4timeService.use(argosyTime())5timeService.accept({time: true}, function (req, cb) {6 cb(null, {time: new Date()})7})8timeService.listen(8000)9var argosy = require('argosy')10var argosyTime = require('argosy-time')11var timeConsumer = argosy()12timeConsumer.use(argosyTime())13timeConsumer.act({time: true}, function (err, res) {14 console.log(res.time)15})16timeConsumer.connect(8000)17var argosy = require('argosy')18var argosyTime = require('argosy-time')19var timeConsumer = argosy()20timeConsumer.use(argosyTime())21timeConsumer.act({time: true}, function (err, res) {22 console.log(res.time)23})24timeConsumer.connect(8000)25var argosy = require('argosy')26var argosyTime = require('argosy-time')27var timeConsumer = argosy()28timeConsumer.use(argosyTime())29timeConsumer.act({time: true}, function (err, res) {30 console.log(res.time)31})32timeConsumer.connect(8000)33var argosy = require('argosy')34var argosyTime = require('argosy-time')35var timeConsumer = argosy()36timeConsumer.use(argosyTime())37timeConsumer.act({time: true}, function (err, res) {38 console.log(res.time)39})40timeConsumer.connect(8000)41var argosy = require('argosy')42var argosyTime = require('argosy-time')43var timeConsumer = argosy()44timeConsumer.use(argosyTime())45timeConsumer.act({time: true}, function (err, res) {

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var time = require('argosy-pattern/time')3var service = argosy()4service.use('time', time(function (err, time) {5 if (err) throw err6 console.log(time)7}))8service.listen(8000)9var argosy = require('argosy')10var time = require('argosy-pattern/time')11var service = argosy()12service.use('time', time(function (err, time) {13 if (err) throw err14 console.log(time)15}))16service.listen(8000)17var argosy = require('argosy')18var time = require('argosy-pattern/time')19var service = argosy()20service.use('time', time(function (err, time) {21 if (err) throw err22 console.log(time)23}))24service.listen(8000)25var argosy = require('argosy')26var time = require('argosy-pattern/time')27var service = argosy()28service.use('time', time(function (err, time) {29 if (err) throw err30 console.log(time)31}))32service.listen(8000)33var argosy = require('argosy')34var time = require('argosy-pattern/time')35var service = argosy()36service.use('time', time(function (err, time) {37 if (err) throw err38 console.log(time)39}))40service.listen(8000)41var argosy = require('argosy')42var time = require('argosy-pattern/time')43var service = argosy()44service.use('time', time(function (err, time) {45 if (err) throw err46 console.log(time)47}))48service.listen(8000)49var argosy = require('argosy')50var time = require('argosy-pattern/time')51var service = argosy()52service.use('time', time(function (err, time)

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy');2var argosyTime = require('argosy-time');3var time = argosyTime(argosy());4time.time(function (err, time) {5 console.log(time);6});

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var time = require('argosy-pattern/time')3var service = argosy()4service.use('time', time())5service.listen(8000)6var argosy = require('argosy')7var time = require('argosy-pattern/time')8var service = argosy()9service.use('time', time())10service.listen(8001)11var argosy = require('argosy')12var time = require('argosy-pattern/time')13var service = argosy()14service.use('time', time())15service.listen(8002)16var argosy = require('argosy')17var time = require('argosy-pattern/time')18var service = argosy()19service.use('time', time())20service.listen(8003)21var argosy = require('argosy')22var time = require('argosy-pattern/time')23var service = argosy()24service.use('time', time())25service.listen(8004)26var argosy = require('argosy')27var time = require('argosy-pattern/time')28var service = argosy()29service.use('time', time())30service.listen(8005)

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy');2var time = argosy.pattern({ path: 'time', method: 'get' });3var timeService = argosy();4timeService.pipe(argosy.accept(time)).pipe(timeService);5timeService.accept({ path: 'time', method: 'get' }, function (args, callback) {6 callback(null, { time: new Date() });7});8timeService.listen(8000);9var argosy = require('argosy');10var time = argosy.pattern({ path: 'time', method: 'get' });11var timeService = argosy();12timeService.pipe(argosy.accept(time)).pipe(timeService);13timeService.accept({ path: 'time', method: 'get' }, function (args, callback) {14 callback(null, { time: new Date() });15});16timeService.listen(8000);17var argosy = require('argosy');18var time = argosy.pattern({ path: 'time', method: 'get' });19var timeService = argosy();20timeService.pipe(argosy.accept(time)).pipe(timeService);21timeService.accept({ path: 'time', method: 'get' }, function (args, callback) {22 callback(null, { time: new Date() });23});24timeService.listen(8000);25var argosy = require('argosy');26var time = argosy.pattern({ path: 'time', method: 'get' });27var timeService = argosy();28timeService.pipe(argosy.accept(time)).pipe(timeService);29timeService.accept({ path: 'time', method: 'get' }, function (args, callback) {30 callback(null, { time: new Date() });31});32timeService.listen(8000);33var argosy = require('argosy');34var time = argosy.pattern({ path: 'time', method: 'get' });35var timeService = argosy();36timeService.pipe(argosy.accept(time)).pipe(timeService);37timeService.accept({ path: 'time', method: 'get' }, function (args, callback) {38 callback(null, { time: new Date() });39});40timeService.listen(8000);41var argosy = require('argosy');42var time = argosy.pattern({ path: 'time', method:

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy');2var time = require('argosy-pattern-time');3var timeService = argosy().use(time());4timeService.accept({time: true}, function (err, result) {5});6var argosy = require('argosy');7var time = require('argosy-pattern-time');8var timeService = argosy().use(time());9timeService.accept({time: true}, function (err, result) {10});11var argosy = require('argosy');12var time = require('argosy-pattern-time');13var timeService = argosy().use(time());14timeService.accept({time: true}, function (err, result) {15});16var argosy = require('argosy');17var time = require('argosy-pattern-time');18var timeService = argosy().use(time());19timeService.accept({time: true}, function (err, result) {20});21var argosy = require('argosy');22var time = require('argosy-pattern-time');23var timeService = argosy().use(time());24timeService.accept({time: true}, function (err, result) {25});26var argosy = require('argosy');27var time = require('argosy-pattern-time');28var timeService = argosy().use(time());29timeService.accept({time: true}, function (err, result)

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy');2var time = argosy.time();3time(function (err, time) {4 console.log(time);5});6var argosy = require('argosy');7var pattern = require('argosy-pattern');8var time = pattern.time();9argosy().use(function (req, next) {10 if (req.time) {11 return next(null, {12 time: new Date()13 });14 }15 next();16}).listen(8000);17time(function (err, time) {18 console.log(time);19});20var argosy = require('argosy');21var pattern = require('argosy-pattern');22var time = pattern.time();23argosy().use(function (req, next) {24 if (req.time) {25 return next(null, {26 time: new Date()27 });28 }29 next();30}).listen(8000);31time(function (err, time) {32 console.log(time);33});34var argosy = require('argosy');35var pattern = require('argosy-pattern');36var time = pattern.time();37argosy().use(function (req, next) {38 if (req.time) {39 return next(null, {40 time: new Date()41 });42 }43 next();44}).listen(8000);45time(function (err, time) {46 console.log(time);47});48var argosy = require('argosy');49var pattern = require('argosy-pattern');50var time = pattern.time();51argosy().use(function (req, next) {52 if (req.time) {53 return next(null, {54 time: new Date()55 });56 }57 next();58}).listen(8000);59time(function (err, time) {60 console.log(time);61});62var argosy = require('argosy');63var pattern = require('argosy-pattern');64var time = pattern.time();65argosy().use(function (req, next) {

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run argos automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful