哪个libc时间给我一天的时间? [英] which libc time gives me the time of day?

查看:82
本文介绍了哪个libc时间给我一天的时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Fedora 33乐

Fedora 33 Raku

我想使用NativeCall与lic.so.6进行交流,以作为我正在编写的示例.我发现了

I want to talk to lic.so.6 with NativeCall for an example I am writing. I have found

但是我不知道哪一个会给我一天中的时间(21:02:03)

But I can't figure out which one will just give me the time of day (21:02:03)

推荐答案

原则上我不应该尝试写答案. [1] 但有人说不耐烦和/或狂妄自大可能是一种美德...

In principle I shouldn't be trying to write an answer.[1] But some say impatience and/or hubris can be a virtue...

只给我一天中的时间(21:02:03)

just give me the time of day (21:02:03)

您链接的页面仅列出介绍性文档所说的与人们通常认为...时间的方式无关"的功能. [3]

The page you linked only lists functions that the introductory doc says have "no relation to the way people normally think of ... time".[3]

我查看了Håkon链接的模块及其使用的模块:

I looked at the module Håkon linked, and a module it uses: P5localtime. It includes this line:

my sub get-ctime(int64 is rw --> Str) is native is symbol<ctime> {*}

这将调用C函数 ctime ,该函数记录在

This calls the C function ctime that's documented on the Formatting Calendar Time page of the site you linked.

我的猜测是您想调用 ctime_r 函数或类似函数.

My guess is that you want to call the ctime_r function or similar.

我回想起最近在阅读您自己与某人之间的交流,这些人对这类事情(ugexe?)有关如何专门选择 glibc.so.6 而不是其他版本的了解,所以我将跳过那皱纹.

I recall recently reading an exchange between yourself and someone knowledgeable about such things (ugexe?) about how you can specifically pick up glibc.so.6 rather than some other version, so I'll skip that wrinkle.

[1] 很高兴为您提供时间,尽管可能不是您想要的时间.我几乎不了解相关成分 [2] .我回答您问题的唯一借口是,我有时有足够的时间,并且有些狂妄和不耐烦地回答关于我一无所知的主题的问题,这不是拉里(Larry)的美德.

[1] I'm happy to give you the time of day, though it might not be the time of day you want. I know next to nothing about the relevant ingredients[2]. My only excuse for answering your question is that I sometimes have sufficient time and the sort of hubris and impatience to answer questions about topics I know nothing about that are not the virtues Larry meant.

[2] 我不记得使用C编写任何生产代码.我不知道libc时间功能.我只使用NativeCall进行了一些琐碎的事情,例如我在阅读此博客帖子.

[3] 您正在查看的页面- 时间基础的页面strong> 强烈建议我要使用

[3] The page you're looking at -- Getting the time -- presumably sounds promising to you, but if you go up a few levels in the web site you'll come to a page titled Time Basics that strongly suggests to me that you want to use functions from either the Formatting Calendar Time page or the Broken-down Time page.[4]

[4] 尽管我确实有疑问.首先,我不知道我在说什么. [2] 其次,每个函数都具有这样令人费解的注释:

[4] Though I do have doubts. First, I don't know what I'm talking about.[2] Second, each of the functions has annotations like this that are troubling:

不安全堆锁

我将留给您阅读 POSIX安全概念文档,因此您可以进行相应的调整.

I'll leave it up to you to read the POSIX Safety Concepts doc that explains those terms, so you can adapt accordingly.

这篇关于哪个libc时间给我一天的时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆