Commit 8c2d237
committed
clipmenud: Make partial merge timing tighter
Use CLOCK_MONOTONIC and compare the actual elapsed time when deciding
whether a new clip is close enough to count as a partial merge.
This is necessary because the old time(NULL) check only has second
granularity. In practice that gives partial_merge_secs extra slack
around second boundaries, so a setting of 2 could still merge clips that
arrived more than 2 seconds later. Maybe that doesn't matter for users,
but it does matter for testing flakiness.1 parent 697964e commit 8c2d237
2 files changed
Lines changed: 37 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
82 | 101 | | |
83 | 102 | | |
84 | 103 | | |
| |||
351 | 370 | | |
352 | 371 | | |
353 | 372 | | |
354 | | - | |
| 373 | + | |
355 | 374 | | |
356 | 375 | | |
357 | 376 | | |
358 | | - | |
| 377 | + | |
359 | 378 | | |
360 | 379 | | |
361 | 380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
109 | 123 | | |
110 | 124 | | |
111 | 125 | | |
| |||
282 | 296 | | |
283 | 297 | | |
284 | 298 | | |
285 | | - | |
286 | | - | |
287 | | - | |
| 299 | + | |
288 | 300 | | |
289 | 301 | | |
290 | 302 | | |
| |||
0 commit comments