修正了 ROUNDLINE 绘制的问题,现在 ToHeart2 的表盘能够很好的绘制了。之前绘制的时候,时针和分针的长度一样,而且时针的位置不正确。查了半天代码,估计是因为某处没有用浮点运算,于是整型运算导致有较大的误差。
这两天又添加了一些皮肤,正在进行测试中。这个 Screenlet 已经基本能够正常使用了,就算作一个 Milestone 吧。
I think, therefore I panic
def gobject.timeout_add(interval, callback, ...)这个函数被用于设置一个定时器,以便在固定的时间间隔 interval (单位:毫秒)后调用 callback 函数,之后的参数(...部分)则被传送给 callback 函数。callback 函数需要返回一个 bool 值,如果为 True 的话,则说明该定时器需要继续运行;而如果值为 False 的话,该计时器就会停止工作,不再定时调用 callback 函数。Note that timeout functions may be delayed, due to the processing of other event sources. Thus they should not be relied on for precise timing. After each call to the timeout function, the time of the next timeout is recalculated based on the current time and the given interval (it does not try to 'catch up' time lost in delays).
| Feature Name | UDP | TCP | SCTP | DCCP |
|---|---|---|---|---|
| Connection oriented | No | Yes | Yes | Yes |
| Reliable transport | No | Yes | Yes | No |
| Unreliable transport | Yes | No | Yes | Yes |
| Preserve message boundary | Yes | No | Yes | Yes |
| Ordered delivery | No | Yes | Yes | No |
| Unordered delivery | Yes | No | Yes | Yes |
| Data checksum | Yes | Yes | Yes | Unsure |
| Checksum size (bits) | 16 | 16 | 32 | Unsure |
| Path MTU | No | Yes | Yes | Yes |
| Congestion control | No | Yes | Yes | Yes |
| Multiple streams | No | No | Yes | No |
| Multi-homing support | No | No | Yes | Unsure |
| Bundling / Nagle | No | Yes | Yes | No |