The Auctioneer and the Treasury Chief: Billy Long’s Quick Fall at the I.R.S.
© Kenny Holston/The New York Times
© Kenny Holston/The New York Times
你肯定也看过苹果和岳云鹏合作的广告,其中最核心的主张就是:
力保隐私安全,这很 iPhone。
苹果是这么说的,确实也是这么做的。只是,当「隐私」和「道德」 被放在天平的两端时,即便是苹果,也会面临进退维谷的难题。
▲ 苹果和岳云鹏合作广告海报. 图片来自:Apple
据 9to5mac 报道,苹果在 iOS 26 的开发者预览版中,推出了 FaceTime 的裸露检测功能,意在检测视频通话中的不当裸露内容。
据悉,苹果将通过设备端侧的 AI 算法来实时识别通话中的裸露内容,当系统识别出可能的裸露画面时,它会立即暂停视频通话并显示警告。
苹果表示,该功能的设计初衷,是为了在儿童账户上应用,给青少年提供一个更加安全的数字社交环境。
▲ FaceTime 冻结界面. 图片来自:9to5Mac
该功能源自于苹果在几年前推行的 CSAM(儿童性虐待材料)扫描计划。但不知道出于什么考虑,这项功能在 iOS 26 开发者版本中被扩大到覆盖所有年龄的用户。也就是说,成人用户也被「保护」起来了。
尽管苹果强调所有识别工作都在设备本地处理,数据不会上传至云端,但年龄覆盖扩大的情况还是在社交媒体上引发广泛争议。一位名为 krazygreekguy 的用户在 9to5mac 上评论道:
我理解背后的想法,但他们无权对成年人实施这种控制。没有任何组织有权侵犯人们的隐私。
▲ 苹果宣传图. 图片来自:Apple
换言之,人们担心这种年龄覆盖的扩大是一种苹果独有权力的扩张,以至于到了过度干预私人生活的境地,甚至可能扩大到和色情意图完全无关的场景。
试想一下,你正在和家里的小孩视频通话,只是因为光着膀子或者调整衣物,就可能会被系统误判为不当裸露,而导致视频被拦截:
难道我的 iPhone 认为我是个变态?
▲ FaceTime. 图片来自:Apple
事实上,FaceTime 已经问世 14 年,作为苹果生态的「元老级」功能,这也不是它首次引起争议。2019 年,FaceTime 就曾因为技术漏洞,让用户在未接通的情况下听到对方通话的声音。虽然苹果迅速修复了漏洞,这也让很多人对苹果的隐私宣传话术之下的真实保护能力,产生了疑虑。
▲ 苹果宣传图. 图片来自:Apple
作为公司的核心价值观,苹果对用户隐私保护方面一直很重视。
长期关注苹果的人,可能会对 2015 年苹果硬刚 FBI 的事件记忆犹新——当年,在加州圣贝纳迪诺枪击案后,FBI 为了获取恐怖活动信息,要求解锁涉案凶手使用的 iPhone,但遭到苹果拒绝。当时,苹果 CEO 蒂姆·库克表示:后门一旦开了,就关不上了,将会危及所有用户的安全与隐私。
▲ FaceTime 界面. 图片来自:Apple
但即便如此,苹果也曾因隐私问题引发不小一些争议。比如前面提到的 CSAM 扫描计划,在推出时同样备受批评。
从 2021 年的 iOS 15 开始,苹果通过本地设备上的 NeuralHash 技术,将用户上传到 iCloud 的照片与美国权威机构维护的 CSAM 数据库进行哈希值比对,当超过预设阈值的情况发生,苹果就会解密相关数据并进行人工审核,确认后将禁用账户,并向美国国家失踪和受虐儿童中心(NCMEC)举报。
苹果声称这一功能的用意是发现和揪出儿童性犯罪者,在技术上最大限度保护用户隐私,避免误判和滥用。
但各路隐私保护组织和安全专家质疑苹果是否会背离其一贯的隐私保护承诺,毕竟 CSAM 扫描究其根本还是识别了用户上传的隐私信息。面对压力,苹果宣布推迟该功能的发布,转而推出其他儿童保护措施,如信息通信安全和 Siri 搜索干预功能。
对于苹果来说,「道德」与「隐私」也会出现不可兼得的情况。
回到刚开始说的 FaceTime 裸露检测:从苹果的初衷来看,这是一个为了更好保护青少年而推出的安全特性,它有助于防止青少年在视频通话中接触到不适当的裸露内容——类似的手机视频通话性骚扰和欺诈案例,全球范围内不胜枚举。坐拥十几亿用户,苹果确实也该承担这样的社会责任。
但另一方面,这种 「自动干预」 的边界在哪里,仍然是一个重要的问题。
当公共道德和个人隐私被摆在天平的两端时,如何权衡利弊,并做出「正确」的决策。这或许会在未来很长一段时间里,都困扰着苹果。
本文作者:周芊彤、肖钦鹏
#欢迎关注爱范儿官方微信公众号:爱范儿(微信号:ifanr),更多精彩内容第一时间为您奉上。
Next to the order of entries in the log, their date and time stamps are one of the most important pieces of information they contain. In some cases, such as when you’re using the log to estimate performance, their accuracy is vital. This article reports the results from tests to validate the times given in log records provided by the log show
command, and in my free log browsers LogUI and Ulbow.
Dates and times given in log extracts invariably match those of the Mac’s system clock, the only catch here being adjustments for time zone and DST. The latter can become confusing if you look at the log when DST is changed, or from a different time zone. To cope with that you can use the --timezone local
option in log show
to express all times with uniform adjustment. Ulbow doesn’t use that, but LogUI does now synchronise all time and date stamps to the current time zone and DST.
The log is an excellent tool for measuring time and performance, either using regular entries or Signposts that are intended for the purpose. Writing an entry into the log incurs minimal overhead, and is simple to perform from any code or script. If your favourite scripting language doesn’t give direct access to writing entries, then you can use my free command tool blowhole
to do so. If you want to assess processes in macOS, then it’s usually straightforward to identify appropriate milestones that mark events and use those to calculate the period. These all depend on the times reported in log entries being sufficiently accurate.
Since Mac OS X, every Mac has had a high-precision internal clock within it (prior to that Time Manager could resolve times down to the microsecond but no further). This increments monotonically in ‘ticks’, an unsigned 64-bit integer, starting from an arbitrary value, and is referred to as Mach Absolute Time (MAT).
Intel Macs increment their ‘tick’ count once every nanosecond, so the difference between two readings of the clock represents the time interval in nanoseconds. Life isn’t as simple with Apple silicon Macs, as they tick three times every 125 nanoseconds, or once every 41.67 nanoseconds. Apple’s latest documentation on MAT, its units and use, comes in a Technical Q&A dated 2005.
Once correctly converted into nanoseconds, MAT is the closest available measurement of time to a gold standard.
I suspect that log entries are originally given a raw MAT as their time, and that can be made available using the log show
command, or in Ulbow, as that uses log show
to obtain log entries. LogUI reads the log directly, through the OSLog API in macOS, which currently doesn’t provide MAT values, instead giving a lower resolution Date value.
This validation therefore compares time intervals given by Ulbow from log entry timestamps, and those given in LogUI, against MAT intervals obtained in Ulbow. To increase the challenge, log entries used are from blowhole
writing 25 log entries as fast as it can, a worst case scenario as that writes 2-3 entries each microsecond.
Log extracts obtained using log show
in Ulbow and those estimated by LogUI were compared, and their timestamps were found to be identical.
On an Apple silicon Mac (M4 Pro), entries written by blowhole
had raw MAT values that recorded intervals of 9 or 10 ticks between them, after the first three were made 73 and 15 ticks apart. From the third of the series of 25 log entries there was a strong linear relationship between recorded MAT in nanoseconds elapsed and loop number, as shown in the chart below.
The gradient of the regressed line shows that blowhole
‘s log entries occurred at intervals of just under 405 nanoseconds.
Because LogUI (and regular timestamps in log show
and Ulbow) only resolve to microseconds, the matching plot for LogUI’s times against loop number is stepped.
The gradient of this regression line is 0.4, indicating that the intervals occurred at 400 nanoseconds, almost identical to that found for the MAT.
Plotting times measured by LogUI (which also represents those for Ulbow and log show
, as they’re identical) against that of MAT shows a good linear relationship with a gradient of just under 1.009, indicating that timestamps in log show
, Ulbow and LogUI are accurate and reliable estimates of MAT.
Differences between pairs of time estimates obtained from MAT and LogUI ranged from -83 to +792 nanoseconds, with a median of +370 and quartiles of +83 to +583 nanoseconds.
log show
are reliable estimates of MAT to within +0.8 microseconds.log show
or Ulbow should be used, and converted into nanoseconds.Quite unintentionally, last week became a saga about time, and a good demonstration of how you should do your utmost to avoid working with it. This all started with an irksome problem in my new log browser LogUI.
LogUI departs from my previous log browsers in accessing log entries through the macOS API added in Catalina. When it first arrived, I found it opaque, and its documentation too incomplete to support coding a competitive browser at that time. Since then I have revisited this on several occasions, and each time retreated to using the log show
command to obtain log extracts. As far as time is concerned, that presents me with two alternatives: a formatted string containing a date and timestamp down to the microsecond (10^-6 second), and a Mach timestamp giving the ‘ticks’ from an arbitrary start time.
Although the latter can only give relative time, the timestamp provided suffices for most purposes, and comes already formatted as2025-05-25 07:51:05.200099+0100
for example.
When you use the macOS API, date and time don’t come formatted, but are supplied as a Date, an opaque structure that can be formatted using a DateFormatterlet dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss.SSSZ"
let dateString = dateFormatter.string(from: date)
to provide2025-05-24 13:46:12.683+0100
That only gives time down to the millisecond (10^-3 second), which is inadequate for many purposes. But changing the formatting string to "yyyy-MM-dd HH:mm:ss.SSSSSSZ"
just returns2025-05-24 13:46:12.683000+0100
with zeroed microseconds. As I can’t find any documentation that states the expected time resolution of Dates, it’s unclear whether this is a bug or feature, but either way a different approach is needed to resolve time beyond milliseconds.
The only method I can see to recover higher precision in the macOS API is using DateComponents to provide nanoseconds (10^-9 second).Calendar.current.component(.nanosecond, from: date)
returns an integer ready to format into a string usingnanosecStr = String(format: "%09d", nanoSeconds)
to give all nine digits.
Inserting that into a formatted date is a quick and simple way to construct what we want,2025-05-24 13:46:12.683746842+0100
down to the nanosecond.
It’s only when you come to examine more closely whether the numbers returned as nanoseconds match changes seen in Mach timestamp, that you realise they’re a fiction, and what’s given as nanoseconds is in fact microseconds with numerical decoration.
The answer then is to round what’s given as nanoseconds to the nearest microsecond, which then matches what’s shown in Mach timestampslet nanoSeconds = Int((Double(Calendar.current.component(.nanosecond, from: date))/1000.0).rounded())
and that can be converted into a string usingnanosecStr = String(format: "%06d", nanoSeconds)
Rather than manually format the rest of the date and timestamp, you can splice microseconds into the @ position of the format string"yyyy-MM-dd HH:mm:ss.@Z"
turning2025-05-24 13:46:12.@+0100
into2025-05-24 13:46:12.683747+0100
Unfortunately, that’s too simple. If you test that method using times, you’ll discover disconcerting anomalies arising from the fact that seconds and microseconds are rounded differently. This is reflected in a sequence such as2025-05-24 13:46:12.994142+0100
2025-05-24 13:46:13.999865+0100
2025-05-24 13:46:13.000183+0100
where the second rounds up to the next second even though the microseconds component hasn’t yet rounded up. The only way to address that is to format all the individual components in the string using DateComponents. And that leaves a further problem: how to get the time zone in standard format like +0100?
Current time zone is available as an opaque TimeZone structure, obtained asTimeZone.current
Note that this doesn’t need to be obtained individually for each Date, as its components are obtained using current Calendar settings, not those at the time the Date was set in that log entry. This should have the beneficial side-effect of unifying times to the same time zone and DST setting.
But that doesn’t offer it in a format like +0100, so that has to be calculated and formatted aslet timeZone = (TimeZone.current.secondsFromGMT())/36
let tzStr = String(format: "%+05d", timeZone)
The complete solution is thus:let timeZone = (TimeZone.current.secondsFromGMT())/36
let tzStr = String(format: "%+05d", timeZone)
let dateComponents = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute, .second, .nanosecond, from: date)
let yearStr = String(format: "%04d", dateComponents.year ?? 0)
let monthStr = String(format: "%02d", dateComponents.month ?? 0)
let dayStr = String(format: "%02d", dateComponents.day ?? 0)
let hourStr = String(format: "%02d", dateComponents.hour ?? 0)
let minuteStr = String(format: "%02d", dateComponents.minute ?? 0)
let secondStr = String(format: "%02d", dateComponents.second ?? 0)
let nanoSeconds = Int((Double(dateComponents.nanosecond ?? 0)/1000.0).rounded())
let nanosecStr = String(format: "%06d", nanoSeconds)
then concatenate those together with punctuation marks as separators to deliver the string2025-05-24 13:46:12.683746+0100
If you’re coding in Swift, you might instead consider using Date.FormatStyle, although its documentation only refers to handling milliseconds, so I suspect that might turn out to be another wild goose chase.
If you know of a better way of handling this explicitly, don’t hesitate to let my code therapist know.
Of all the features of our Macs, the one we most take for granted must be time. From the moment it starts up, we expect its clocks and timekeeping to be accurate, whether it’s the clock at the far right of the menu bar, or times recorded in its logs. This article explains how to ensure that works, and what to do when it doesn’t.
Unless your Mac is one of the few that isn’t connected to the Internet, set it to check time and clocks by syncing with Apple’s Time Server over the network. Standard settings for doing that are located in the Date & Time section of General settings.
Time and date are set automatically using time.apple.com as the source, and where possible the time zone is set automatically using your Mac’s current location.
In some cases, a local network time server may be preferred by setting the source to a different network address. This can be useful within active local networks, where it’s important that all network devices are synchronised to the same source, although that should work just as well using Apple’s time service. Some computers allow you to specify multiple time servers, in case some of them aren’t reachable. macOS only uses one, and if you do provide a list of NTP servers, only the first will be used.
The most common problem arises when the time zone can’t be set automatically using Location Services. This is buried more deeply, in Location Services in Privacy & Security settings. Click on System Services, and ensure you have allowed access to Setting time zone, and that Location Services is enabled.
One common situation where this doesn’t work is in Virtual Machines, which normally aren’t able to get an accurate location as they can’t access Wi-Fi directly. You’ll then have to set the time zone manually.
Like daylight savings or summer time, time zones don’t change the time of the system clock, but are corrections applied to times read from that and presented in localised form for you to see.
Accurate system clock time is of considerable importance in many respects, as it’s used for the timestamps of files and directories, and can have implications for security. APFS uses transaction identifiers (XIDs) to keep track of the order of events within its file systems, so isn’t reliant on timestamps, but other features may not have such an independent mechanism. Backups are an obvious example, where decisions can be confused by contradictory file creation and modification times.
Sometimes users deliberately change the system clock and disable its online updates to run a Mac using past time, for example to work around an expired security certificate. Although that may work well at the time, it can lead to strange problems resulting from disordered time sequences, and should be used with caution.
Accurate and synchronised time has been required since long before the Internet, and is available using other means. Navigation and other systems have been using radio time signals for many decades, and most recently GPS satellites provide highly precise time. The disadvantage to these is that they require special radio receivers that aren’t built into Macs, although most of Apple’s devices now include GPS receivers. Another way to get accurate time is from a local atomic clock, but they’re beyond our budget.
The alternative is an NTP server like time.apple.com, but that poses another problem, as the server has to be polled over the network, and that takes time in both directions. To account for that, macOS has to calculate a time offset as the difference in absolute time between its clock and that of the NTP server, and the round-trip delay for the whole request. It can then estimate how much it needs to adjust the Mac’s clock time to be in sync with the server.
Because time offset and round-trip delay vary in each check with a server, macOS may perform several checks and use those to derive best estimates.
One important confounding factor here is anything that leads to long delays in connecting with the NTP server, and the most common cause of those is using a VPN service. Routing NTP connections through your VPN service can cause inaccurate local clock times.
timed
As far as I’m aware, prior to macOS 10.13 High Sierra, macOS used an ordinary NTP client to connect to NTP servers and correct its clock time. Apple then replaced that with a new and proprietary service timed
, described thus:timed
maintains system clock accuracy by synchronizing the clock with reference clocks via technologies like NTP. Inputs are merged inside of timed
, where it calculates uncertainty to facilitate scheduling proactive time jobs. timed
is also aware of power/battery conditions.
This is run as a LaunchDaemon, found at /System/Library/LaunchDaemons/com.apple.timed.plist. The time server used is set in /etc/ntp.conf, and is normally time.apple.com. timed
relies on three property lists in a locked-down directory /var/db/timed/. These are:
SNTP
macOS 11.0 Big Sur brought two additions to support basic SNTP:
sntp
is a simple NTP client claimed to be able to set or slew the system clock if it’s out of sync;sntpd
is a basic SNTP server daemon that can be launched through /System/Library/LaunchDaemons/com.apple.sntpd.plist, and stores header data in /var/sntpd/state.bin.Neither appears to be run or used routinely in macOS, as it prefers to handle this through timed
and the com.apple.timed
subsystem.
It’s sometimes suggested to use sntp
to adjust the system clock using the commandsudo sntp -sS time.apple.com
Although this runs and reports offsets from the NTP server, it requires sudo
if it’s to perform clock adjustments using adjtime
, and it’s not clear what effect it has on timed
.
timed
and clock adjustment occurs relatively late during the boot process, as it requires timed
to be running with access to network connections. However, you may be confused by a pair of prominent Boundary entries that appear before synchronisation:02.452702045 Boundary === system wallclock time adjusted
02.524229049 Boundary === system wallclock time adjusted
where the initial system boot entry was made at 00.0 seconds. Those are only internal adjustments.
timed
and com.apple.timed subsystem start entries after those, first giving the version and build of timed
, then announcing its start02.741880893 com.apple.timed cmd,start
timed
‘s cached state is then read from disk, and TMTimeSynthesizer is used to set system time03.421952009 com.apple.timed Setting system time to Tue May 20 08:24:04 2025 from TMTimeSynthesizer
Initially, without a network connection, timed
has to wait to sync with the NTP server03.476943969 com.apple.timed We want time and don't have network! Keeping timed alive until network comes up, since we are beyond our wanted threshold.
Eventually, the NTP server is reachable04.200660943 com.apple.timed Fetching NTP time.
04.249860048 com.apple.timed Received time Tue May 20 08:24:05 2025±0.01 from "NTP"
Another three time estimates are obtained from APNS07.982021093 com.apple.timed Received time Tue May 20 08:24:09 2025±35.00 from "APNS"
13.667812108 com.apple.timed Received time Tue May 20 08:24:14 2025±35.00 from "APNS"
14.488466024 com.apple.timed Received time Tue May 20 08:24:15 2025±35.00 from "APNS"
leading to adjustments to system time. I don’t think that the APNS referred to here is Apple Push Notification Service, could it be Apple Primary Name Server, perhaps?
As a general principle, correcting the clock backwards to an earlier time would be bad news, as it would confuse anything that relies on time order. This can be seen, for example, in the autumn/fall when daylight savings or summer time ends in many countries, and localised clocks are set back in time. This ensures that for a period of roughly an hour, localised times duplicate those from the previous hour, and is particularly difficult to handle in log extracts.
If the system clock is going to err, then it’s better for it to be slightly slow, which allows adjustments forward in time that can’t result in duplication of timestamps.
timed
to sync time.sntp
to force sync clock corrections is still available, although it isn’t clear whether it’s effective.timed
activity in the log using the subsystem com.apple.timed
.NTP in Wikipedia
Now we’ve got LogUI to give us the times of log entries down to the nearest nanosecond, it’s time to see whether that’s any improvement over other tools. Given that Mach Absolute Time resolves to nanoseconds (10^-9 seconds) in Intel Macs, and just under 42 nanoseconds in Apple silicon Macs, can we now resolve times of events better than when using microseconds (10^-6 seconds)?
To test this out, I used my command tool blowhole
that can run a tight loop writing entries in the log as fast as possible. To do this, it uses the codefor index in 1...number {
os_log("%d", log: Blowhole.gen_log, type: type, index)
}
I then wrote loops of 20 to the log of an iMac Pro (Intel Xeon W CPU), M3 Pro and M4 Pro, and extracted the resulting log entries using LogUI with its new nanosecond times.
Plotting these times against loop number resulted in unexpected patterns.
In this graph, results from the iMac Pro are shown in black, those from the M3 Pro in blue, and the M4 Pro in red. Although less well-ordered in the first to fourth loops, from the fifth loop onwards there were linear relationships between time of log entries and loop number. Linear regression equations are shown in the legend, and demonstrate:
which perhaps isn’t surprising.
However, the patterns of individual points are quite different. Apart from loops 4 and 5, subsequent loops on the iMac Pro are evenly spaced in time. Those on the Apple silicon chips are grouped in pairs or, for loops 14-16 on the M4 Pro, in a triplet, where two or three loops are assigned the same time in the log.
Looking at time differences, a clear pattern emerges, that log times are incremented in steps of 954 ns. For the iMac Pro, each loop occurs one step later, while for the M3 Pro and M4 Pro steps between pairs and triplets are also 954 ns. In a few cases, the step difference is slightly greater at around 1192 ns instead of 954 ns. Apple silicon chips are faster on average because each step includes two or more loops, while the iMac Pro only manages one loop per step.
If log entry times had been given in microseconds rather than nanoseconds, the same patterns would have been seen. But without the additional precision in their times, it wouldn’t have been clear that multiple log entries were being written with identical times, down to the nanosecond.
One likely explanation is that macOS only writes log entries approximately every microsecond, and the entry time recorded for each is that of that writing. Writing log entries must occur asynchronously for the M3 Pro and M4 Pro to be able to send pairs or triplets to be written, rather than having to wait for each writing process to complete.
Thus, the time resolution of log entries is approximately 1 μs, or 954 or 1192 ns to be more precise, and that’s the same regardless of whether macOS is running on a recent Intel Mac or the latest Apple silicon chips. Although a time resolution of 1 μs is sufficient for general purposes, if you want to dig deeper, as I have done here, access to the finer resolution provided in nanosecond times is essential.
So what is a Dance to the Music of Time? It’s one of Nicolas Poussin’s most brilliant paintings, that inspired a series of twelve novels written by Anthony Powell. While I wouldn’t attempt to summarise those, here’s the painting to enjoy.
Poussin’s Dance to the Music of Time (c 1634-6) shows four young people dancing, who are currently believed to be Poverty (male at the back, facing away), Labour (closest to Time and looking at him), Wealth (in golden skirt and sandals, also looking at Time), and Pleasure (blue and red clothes) who fixes the viewer with a very knowing smile. Opposite Pleasure is a small herm of Janus, whose two faces look to the past and the future. Father Time at the right is playing his lyre to provide the music, and an infant seated by him holds a sandglass, to measure time periods. Above them in the heavens, Aurora (goddess of the dawn) precedes Apollo’s sun chariot, on which the large ring represents the Zodiac, thus the passage of the months. Behind the chariot are the Horai, the four seasons of the year.
Macs keep time exceedingly precisely, although there are important differences here between Intel and Apple silicon models. Their most precise record of time is given in Mach Absolute Time (MAT), the number of ‘ticks’ since an arbitrary start. In Intel Macs, each tick occurs every nanosecond (10^-9 second), providing high resolution, but ticks are less frequent in Apple silicon chips, occurring once every 41.666… nanoseconds instead.
You can test this on an Apple silicon Mac using my free utility Mints, which has a convenient button to display Mach timebase information. Run Mints in native mode, the default as it’s a Universal App, and it reports the Arm values; force it to launch as an app translated by Rosetta, and it will give the same timebase as an Intel Mac.
Although entries in the log are recorded in MAT’s high resolution, most methods of accessing log entries lose much of that precision. The datestamps provided by the log show
command, for example, round time to the nearest microsecond (10^-6 second), although it’s capable of delivering a field in MAT’s nanoseconds. The bundled Console app is similar, but lacks any option to display MAT. My Ulbow app can display both datestamps with microseconds and MAT, but until now LogUI has been limited to displaying only time in milliseconds (10^-3 second).
To put these into context, in each microsecond the P core in the CPU of an M4 chip can complete execution of over 1,000 instructions, and in a millisecond that becomes more than a million instructions.
LogUI has been constrained by the formatted output available using Date and DateFormatter in the macOS API, which appear to be incapable of generating time any more precisely than milliseconds. After several earlier unsuccessful attempts, I’m now able to obtain time in nanoseconds, using Calendar and DateComponents in the API. For example, to obtain a formatted string containing the nanosecond component of a Date variable named date
:let nanoSeconds = Calendar.current.component(.nanosecond, from: date)
let nsTime = String(format: "%09d", nanoSeconds)
The string nsTime
can then be spliced into a formatted date string.
I have incorporated this into a new build of LogUI, which also has extended information about the log display in its Help book. LogUI 1.0 build 48 is now available from here: logui148
and from its Product Page.
Tomorrow I’ll consider whether these more precise times are of use, and what we can learn from them.
我好久都没睡好了,值得记录一下。
从半年前手术开始,接连着出差、二次手术、年前的忙、过年的烦、年后的忙,一直到前几天的连续熬夜和通宵工作,我真的很长一段时间里都没有这么深的睡眠了。
前几天为了最后出方案,熬了两个通宵,公司内部的野心和追求都令我感到很失望,复杂的情绪交融在一起,非常难过。但最后还是用我的方式,引导大家选择了我想要的那个。尽管看上去我在力推另一个方案,但是人呐,对于自己没有概念的事情,靠嘴说是没有用的,对于他们来说,打出高中低来,选中间的,是他们能理解的方式。更好的那个,谈不上多超前,仅仅只是不值得而已。算了,以后总会有机会。
昨晚九点半,终于把所有设计文件、模型和工艺文件、USDZ 文件分别发送到了各个下一环节手中。接下来,不用我熬夜,轮到我监督他们干活交东西了。算是阶段性的胜利吧。
心情一好,我就看了半部《无间道3》。
前段时间跟筱烨一起看《无限超越班》,心里的戏瘾就痒痒,但是现在没有机会上舞台了,就上 Netflix 找了无间道三部曲开始看。之前分两周陆续看完了前两部,昨晚难得松懈一下,一口气看了半部三。
为了帮我补熬夜的气血,筱烨给我买了两次西洋参。第一盒前几天喝完了,前天又到了一盒,昨晚睡前温热地喝了一杯。
大概是工作的疲惫 + 阶段胜利的松懈 + 看电影的愉悦 + 西洋参补的气,一起让我睡了一顿好觉吧?