# Arabic translation of manpages # This file is distributed under the same license as the manpages-l10n package. # Copyright © of this file: # زايد السعيدي , 2026. msgid "" msgstr "" "Project-Id-Version: manpages-l10n 4.30.2\n" "POT-Creation-Date: 2026-06-05 06:20+0200\n" "PO-Revision-Date: 2026-05-17 19:31+0400\n" "Last-Translator: Zayed Al-Saidi \n" "Language-Team: Arabic \n" "Language: ar\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" "X-Generator: Lokalize 23.08.5\n" #. type: TH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "clock_getres" msgstr "clock_getres" #. type: TH #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "2026-03-07" msgstr "7 مارس 2026" #. type: TH #: archlinux debian-unstable #, no-wrap msgid "Linux man-pages 6.18" msgstr "صفحات دليل لينكس 6.18" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "الاسم" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "clock_getres, clock_gettime, clock_settime - clock and time functions" msgstr "clock_getres, clock_gettime, clock_settime - دوال الساعة والوقت" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "المكتبة" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "Standard C library (I,\\ I<-lc>), since glibc 2.17" msgstr "مكتبة C القياسية (I,\\ I<-lc>)، منذ glibc 2.17" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "Before glibc 2.17, Real-time library (I,\\ I<-lrt>)" msgstr "قبل glibc 2.17، مكتبة الوقت الحقيقي (I،\\ I<-lrt>)" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "موجز" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B<#include Etime.hE>\n" msgstr "B<#include Etime.hE>\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "BIB<, struct timespec *_Nullable >IB<);>\n" msgstr "BIB<, struct timespec *_Nullable >IB<);>\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "BIB<, struct timespec *>IB<);>\n" "BIB<, const struct timespec *>IB<);>\n" msgstr "" "BIB<, struct timespec *>IB<);>\n" "BIB<, const struct timespec *>IB<);>\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Feature Test Macro Requirements for glibc (see B(7)):" msgstr "" "متطلبات ماكروات اختبار الميزات لـ glibc (انظر B(7)):" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "B(), B(), B():" msgstr "B()، B()، B():" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid " _POSIX_C_SOURCE E= 199309L\n" msgstr " _POSIX_C_SOURCE E= 199309L\n" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "الوصف" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The function B() finds the resolution (precision) of the " "specified clock I, and, if I is non-NULL, stores it in the " "I pointed to by I. The resolution of clocks depends " "on the implementation and cannot be configured by a particular process. If " "the time value pointed to by the argument I of B() is " "not a multiple of I, then it is truncated to a multiple of I." msgstr "" "تجد الدالة B() دقة (إحكام) الساعة المحددة I، وإذا كان " "I غير NULL، تخزنه في I المشار إليه بواسطة I. " "تعتمد دقة الساعات على التنفيذ ولا يمكن تكوينها بواسطة عملية معينة. إذا كانت " "قيمة الوقت المشار إليها بواسطة الوسيطة I للدالة B() ليست " "مضاعفًا لـ I، فسيتم اقتطاعها إلى مضاعف لـ I." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The functions B() and B() retrieve and set " "the time of the specified clock I." msgstr "" "تسترجع الدالتان B() و B() وقت الساعة المحددة " "I وتضبطانه." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "The I and I arguments are B(3) structures." msgstr "الوسيطتان I و I هما بنيتان من نوع B(3)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The I argument is the identifier of the particular clock on which " "to act. A clock may be system-wide and hence visible for all processes, or " "per-process if it measures time only within a single process." msgstr "" "الوسيطة I هي معرف الساعة المحددة التي سيتم العمل عليها. قد تكون " "الساعة على مستوى النظام وبالتالي مرئية لجميع العمليات، أو لكل عملية إذا كانت " "تقيس الوقت فقط داخل عملية واحدة." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "All implementations support the system-wide real-time clock, which is " "identified by B. Its time represents seconds and " "nanoseconds since the Epoch. When its time is changed, timers for a " "relative interval are unaffected, but timers for an absolute point in time " "are affected." msgstr "" "تدعم جميع التطبيقات ساعة الوقت الحقيقي على مستوى النظام، والتي يتم تعريفها " "بواسطة B. يمثل وقتها الثواني والنانوثواني منذ الحقبة. عندما " "يتغير وقتها، لا تتأثر الموقتات لفاصل زمني نسبي، ولكن تتأثر الموقتات لنقطة " "زمنية مطلقة." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "More clocks may be implemented. The interpretation of the corresponding " "time values and the effect on timers is unspecified." msgstr "" "قد يتم تنفيذ ساعات إضافية. تفسير قيم الوقت المقابلة والتأثير على الموقتات " "غير محدد." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Sufficiently recent versions of glibc and the Linux kernel support the " "following clocks:" msgstr "" "تدعم الإصدارات الحديثة بما فيه الكفاية من glibc ونواة لينكس الساعات التالية:" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "A settable system-wide clock that measures real (i.e., wall-clock) time. " "Setting this clock requires appropriate privileges. This clock is affected " "by discontinuous jumps in the system time (e.g., if the system administrator " "manually changes the clock), and by frequency adjustments performed by NTP " "and similar applications via B(3), B(2), " "B(2), and B(3). This clock normally counts the " "number of seconds since 1970-01-01 00:00:00 Coordinated Universal Time " "(UTC) except that it ignores leap seconds; near a leap second it is " "typically adjusted by NTP to stay roughly in sync with UTC." msgstr "" "ساعة قابلة للضبط على مستوى النظام تقيس الوقت الحقيقي (أي وقت الحائط). يتطلب " "ضبط هذه الساعة صلاحيات مناسبة. تتأثر هذه الساعة بالقفزات غير المستمرة في وقت " "النظام (مثلًا، إذا قام مسؤول النظام بتغيير الساعة يدويًا)، وبضبط التردد الذي " "تقوم به NTP والتطبيقات المماثلة عبر B(3)، B(2)، " "B(2)، و B(3). تحسب هذه الساعة عادةً عدد الثواني " "منذ 1970-01-01 00:00:00 التوقيت العالمي المنسق (UTC) باستثناء أنها تتجاهل " "الثواني الكبيسة؛ بالقرب من ثانية كبيسة، يتم ضبطها عادةً بواسطة NTP للبقاء " "متزامنة تقريبًا مع UTC." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B (since Linux 3.0; Linux-specific)" msgstr "B (منذ لينكس 3.0؛ خاص بلينكس)" #. type: Plain text #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Like B, but settable only indirectly by setting " "B, and behaves differently if the system is suspended. See " "B(2)." msgstr "" "مثل B، ولكن قابل للضبط فقط بشكل غير مباشر عن طريق ضبط " "B، ويتصرف بشكل مختلف إذا كان النظام معلقًا. انظر " "B(2)." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B (since Linux 2.6.32; Linux-specific)" msgstr "B (منذ لينكس 2.6.32؛ خاص بلينكس)" #. Added in commit da15cfdae03351c689736f8d142618592e3cebc3 #. type: Plain text #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed msgid "" "A faster but less precise version of B. It is settable only " "indirectly by setting B. Use when you need very fast, but " "not fine-grained timestamps. Requires per-architecture support, and " "probably also architecture support for this flag in the B(7)." msgstr "" "نسخة أسرع ولكن أقل دقة من B. قابل للضبط فقط بشكل غير مباشر " "عن طريق ضبط B. استخدمه عندما تحتاج إلى طوابع زمنية سريعة " "جدًا، ولكن ليست دقيقة. يتطلب دعمًا لكل بنية، وربما أيضًا دعم بنية لهذه العلامة " "في B(7)." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B (since Linux 3.10; Linux-specific)" msgstr "B (منذ لينكس 3.10؛ خاص بلينكس)" #. commit 1ff3c9677bff7e468e0c487d0ffefe4e901d33f4 #. type: Plain text #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed msgid "" "A system-wide clock derived from wall-clock time but counting leap seconds. " "This clock does not experience clock adjustments caused by inserting leap " "seconds as B does. It counts seconds since 1970-01-01 00:00 " "TAI (1969-12-31 23:59:50 UTC), so its epoch is ten seconds before " "B's. However, its implementation requires help from NTP, " "and if that help is not available it behaves like B instead." msgstr "" "ساعة على مستوى النظام مشتقة من وقت الحائط ولكنها تحسب الثواني الكبيسة. لا " "تواجه هذه الساعة تعديلات الساعة الناتجة عن إدراج الثواني الكبيسة كما تفعل " "B. تحسب الثواني منذ 1970-01-01 00:00 TAI (1969-12-31 " "23:59:50 UTC)، لذا فإن حقبتها تسبق حقبة B بعشر ثوانٍ. ومع " "ذلك، يتطلب تنفيذها مساعدة من NTP، وإذا لم تكن هذه المساعدة متاحة، فإنها " "تتصرف مثل B بدلاً من ذلك." #. type: Plain text #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Its relationship to B for timestamps before 1972 is only " "approximate, as the leap second regime was introduced on 1972-01-01. " "Because leap seconds are planned to be discontinued, its value from now on " "will likely remain exactly 37 seconds greater than B's for " "many years, after which its offset from B's will likely be " "adjusted by some other mechanism as yet unspecified. It is settable only " "indirectly by setting B." msgstr "" "علاقتها بـ B للطوابع الزمنية قبل 1972 تقريبية فقط، حيث تم " "تقديم نظام الثواني الكبيسة في 1972-01-01. نظرًا لأنه من المخطط إيقاف الثواني " "الكبيسة، فمن المحتمل أن تظل قيمتها من الآن فصاعدًا أكبر بـ 37 ثانية بالضبط من " "قيمة B لسنوات عديدة، وبعد ذلك من المحتمل أن يتم ضبط إزاحتها " "عن B بواسطة آلية أخرى غير محددة بعد. قابلة للضبط فقط بشكل " "غير مباشر عن طريق ضبط B." #. type: Plain text #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The acronym TAI stands for the French \"temps atomique international\", or " "International Atomic Time." msgstr "" "يرمز الاختصار TAI إلى العبارة الفرنسية \"temps atomique international\"، أو " "التوقيت الذري الدولي." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "A nonsettable system-wide clock that represents monotonic time since\\[em]as " "described by POSIX\\[em]\"some unspecified point in the past\". On Linux, " "that point corresponds to the number of seconds that the system has been " "running since it was booted." msgstr "" "ساعة غير قابلة للضبط على مستوى النظام تمثل الوقت الرتيب منذ\\[em]كما هو " "موصوف بواسطة POSIX\\[em]\"نقطة غير محددة في الماضي\". على لينكس، تتوافق تلك " "النقطة مع عدد الثواني التي كان النظام يعمل فيها منذ تشغيله." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B clock is not affected by discontinuous jumps in the " "system time (e.g., if the system administrator manually changes the clock), " "but is affected by frequency adjustments. This clock does not count time " "that the system is suspended. All B variants guarantee " "that the time returned by consecutive calls will not go backwards, but " "successive calls may\\[em]depending on the architecture\\[em]return " "identical (not-increased) time values." msgstr "" "لا تتأثر ساعة B بالقفزات غير المستمرة في وقت النظام (مثلًا، " "إذا قام مسؤول النظام بتغيير الساعة يدويًا)، ولكنها تتأثر بضبط التردد. لا تحسب " "هذه الساعة الوقت الذي يكون فيه النظام معلقًا. تضمن جميع متغيرات " "B أن الوقت الذي يتم إرجاعه بواسطة الاستدعاءات المتتالية لن " "يعود إلى الوراء، ولكن الاستدعاءات المتتالية قد\\[em]اعتمادًا على " "البنية\\[em]تُرجع قيم وقت متطابقة (غير متزايدة)." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B (since Linux 2.6.32; Linux-specific)" msgstr "B (منذ لينكس 2.6.32؛ خاص بلينكس)" #. Added in commit da15cfdae03351c689736f8d142618592e3cebc3 #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "A faster but less precise version of B. Use when you need " "very fast, but not fine-grained timestamps. Requires per-architecture " "support, and probably also architecture support for this flag in the " "B(7)." msgstr "" "نسخة أسرع ولكن أقل دقة من B. استخدمه عندما تحتاج إلى طوابع " "زمنية سريعة جدًا، ولكن ليست دقيقة. يتطلب دعمًا لكل بنية، وربما أيضًا دعم بنية " "لهذه العلامة في B(7)." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B (since Linux 2.6.28; Linux-specific)" msgstr "B (منذ لينكس 2.6.28؛ خاص بلينكس)" #. Added in commit 2d42244ae71d6c7b0884b5664cf2eda30fb2ae68, John Stultz #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Similar to B, but provides access to a raw hardware-based " "time that is not subject to frequency adjustments. This clock does not " "count time that the system is suspended." msgstr "" "مشابه لـ B، ولكنه يوفر الوصول إلى وقت خام قائم على العتاد " "لا يخضع لضبط التردد. لا تحسب هذه الساعة الوقت الذي يكون فيه النظام معلقًا." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B (since Linux 2.6.39; Linux-specific)" msgstr "B (منذ لينكس 2.6.39؛ خاص بلينكس)" #. commit 7fdd7f89006dd5a4c702fa0ce0c272345fa44ae0 #. commit 70a08cca1227dc31c784ec930099a4417a06e7d0 #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "A nonsettable system-wide clock that is identical to B, " "except that it also includes any time that the system is suspended. This " "allows applications to get a suspend-aware monotonic clock without having to " "deal with the complications of B, which may have " "discontinuities if the time is changed using B(2) or similar." msgstr "" "ساعة نظامية غير قابلة للضبط مطابقة لـ B، باستثناء أنها " "تتضمن أيضًا أي وقت يكون فيه النظام معلقًا. يسمح هذا للتطبيقات بالحصول على " "ساعة رتيبة واعية بالتعليق دون الحاجة إلى التعامل مع تعقيدات " "B، التي قد تحتوي على انقطاعات إذا تم تغيير الوقت باستخدام " "B(2) أو ما شابه." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B (since Linux 3.0; Linux-specific)" msgstr "B (منذ لينكس 3.0؛ خاص بلينكس)" #. type: Plain text #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Like B, but behaves differently if the system is suspended. " "See B(2)." msgstr "" "مثل B، لكنه يتصرف بشكل مختلف إذا كان النظام معلقًا. انظر " "B(2)." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B (since Linux 2.6.12)" msgstr "B (منذ لينكس 2.6.12)" #. type: Plain text #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed msgid "" "This clock measures CPU time consumed by this process (i.e., CPU time " "consumed by all threads in the process). On Linux, this clock is not " "settable." msgstr "" "تقيس هذه الساعة وقت وحدة المعالجة المركزية المستهلك بواسطة هذه العملية (أي " "وقت وحدة المعالجة المركزية المستهلك بواسطة جميع الخيوط في العملية). في " "لينكس، هذه الساعة غير قابلة للضبط." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B (since Linux 2.6.12)" msgstr "B (منذ لينكس 2.6.12)" #. type: Plain text #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed msgid "" "This clock measures CPU time consumed by this thread. On Linux, this clock " "is not settable." msgstr "" "تقيس هذه الساعة وقت وحدة المعالجة المركزية المستهلك بواسطة هذا الخيط. في " "لينكس، هذه الساعة غير قابلة للضبط." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "Linux also implements dynamic clock instances as described below." msgstr "ينفذ لينكس أيضًا مثيلات ساعة ديناميكية كما هو موضح أدناه." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Dynamic clocks" msgstr "الساعات الديناميكية" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "In addition to the hard-coded System-V style clock IDs described above, " "Linux also supports POSIX clock operations on certain character devices. " "Such devices are called \"dynamic\" clocks, and are supported since Linux " "2.6.39." msgstr "" "بالإضافة إلى معرفات الساعة بنمط System-V المرمزة بشكل ثابت الموصوفة أعلاه، " "يدعم لينكس أيضًا عمليات ساعة POSIX على أجهزة حرفية معينة. تسمى هذه الأجهزة " "ساعات \"ديناميكية\"، وهي مدعومة منذ لينكس 2.6.39." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Using the appropriate macros, open file descriptors may be converted into " "clock IDs and passed to B(), B(), and " "B(2). The following example shows how to convert a file " "descriptor into a dynamic clock ID." msgstr "" "باستخدام وحدات الماكرو المناسبة، يمكن تحويل واصفات الملفات المفتوحة إلى " "معرفات ساعة وتمريرها إلى B() و B() و " "B(2). يوضح المثال التالي كيفية تحويل واصف ملف إلى معرف ساعة " "ديناميكي." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "#define CLOCKFD 3\n" "#define FD_TO_CLOCKID(fd) ((\\[ti](clockid_t) (fd) EE 3) | CLOCKFD)\n" "#define CLOCKID_TO_FD(clk) ((unsigned int) \\[ti]((clk) EE 3))\n" "\\&\n" "struct timespec ts;\n" "clockid_t clkid;\n" "int fd;\n" "\\&\n" "fd = open(\"/dev/ptp0\", O_RDWR);\n" "clkid = FD_TO_CLOCKID(fd);\n" "clock_gettime(clkid, &ts);\n" msgstr "" "#define CLOCKFD 3\n" "#define FD_TO_CLOCKID(fd) ((\\[ti](clockid_t) (fd) EE 3) | CLOCKFD)\n" "#define CLOCKID_TO_FD(clk) ((unsigned int) \\[ti]((clk) EE 3))\n" "\\&\n" "struct timespec ts;\n" "clockid_t clkid;\n" "int fd;\n" "\\&\n" "fd = open(\"/dev/ptp0\", O_RDWR);\n" "clkid = FD_TO_CLOCKID(fd);\n" "clock_gettime(clkid, &ts);\n" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "RETURN VALUE" msgstr "قيمة الإرجاع" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B(), B(), and B() return 0 for " "success. On error, -1 is returned and I is set to indicate the error." msgstr "" "تعيد B() و B() و B() 0 عند " "النجاح. عند الخطأ، يتم إرجاع -1 ويتم تعيين I للإشارة إلى الخطأ." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "ERRORS" msgstr "الأخطاء" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B() does not have write permission for the dynamic POSIX " "clock device indicated." msgstr "" "لا يمتلك B() إذن الكتابة لجهاز الساعة POSIX الديناميكي المشار " "إليه." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "I points outside the accessible address space." msgstr "يشير I إلى خارج مساحة العنوان القابلة للوصول." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. Linux also gives this error on attempts to set CLOCK_PROCESS_CPUTIME_ID #. and CLOCK_THREAD_CPUTIME_ID, when probably the proper error should be #. EPERM. #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The I specified is invalid for one of two reasons. Either the " "System-V style hard coded positive value is out of range, or the dynamic " "clock ID does not refer to a valid instance of a clock object." msgstr "" "I المحدد غير صالح لأحد سببين. إما أن القيمة الموجبة المرمزة بشكل " "ثابت بنمط System-V خارج النطاق، أو أن معرف الساعة الديناميكي لا يشير إلى " "مثيل صالح لكائن ساعة." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "(B()): I is negative or I is outside " "the range [0, 999,999,999]." msgstr "" "(B()): I سالب أو I خارج النطاق [0, " "999,999,999]." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The I specified in a call to B() is not a settable " "clock." msgstr "" "I المحدد في استدعاء لـ B() ليس ساعة قابلة للضبط." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B (since Linux 4.3)" msgstr "B (منذ لينكس 4.3)" #. commit e1d7ba8735551ed79c7a0463a042353574b96da3 #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "A call to B() with a I of B " "attempted to set the time to a value less than the current value of the " "B clock." msgstr "" "حاول استدعاء لـ B() مع I بقيمة B ضبط " "الوقت على قيمة أقل من القيمة الحالية لساعة B." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The hot-pluggable device (like USB for example) represented by a dynamic " "I has disappeared after its character device was opened." msgstr "" "اختفى الجهاز القابل للتبديل السريع (مثل USB على سبيل المثال) الممثل بواسطة " "I ديناميكي بعد فتح جهازه الحرفي." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The operation is not supported by the dynamic POSIX clock device specified." msgstr "العملية غير مدعومة من قبل جهاز الساعة POSIX الديناميكي المحدد." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The timestamp would not fit in I range. This can happen if an " "executable with 32-bit I is run on a 64-bit kernel when the time is " "2038-01-19 03:14:08 UTC or later. However, when the system time is out of " "I range in other situations, the behavior is undefined." msgstr "" "الطابع الزمني لن يتسع في نطاق I. يمكن أن يحدث هذا إذا تم تشغيل ملف " "تنفيذي مع I 32 بت على نواة 64 بت عندما يكون الوقت 2038-01-19 " "03:14:08 UTC أو لاحقًا. ومع ذلك، عندما يكون وقت النظام خارج نطاق I " "في حالات أخرى، يكون السلوك غير محدد." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B() does not have permission to set the clock indicated." msgstr "لا يمتلك B() الإذن لضبط الساعة المشار إليها." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "ATTRIBUTES" msgstr "السمات" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "For an explanation of the terms used in this section, see B(7)." msgstr "" "للاطلاع على شرح للمصطلحات المستخدمة في هذا القسم، انظر B(7)." #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Interface" msgstr "الواجهة" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Attribute" msgstr "السمة" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Value" msgstr "القيمة" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid ".na\n" msgstr ".na\n" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid ".nh\n" msgstr ".nh\n" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "B(),\n" "B(),\n" "B()" msgstr "" "B(),\n" "B(),\n" "B()" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Thread safety" msgstr "سلامة الخيوط" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "MT-Safe" msgstr "MT-Safe" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "VERSIONS" msgstr "الإصدارات" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "POSIX.1 specifies the following:" msgstr "يحدد POSIX.1 ما يلي:" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Setting the value of the B clock via B() " "shall have no effect on threads that are blocked waiting for a relative time " "service based upon this clock, including the B() function; nor " "on the expiration of relative timers based upon this clock. Consequently, " "these time services shall expire when the requested relative interval " "elapses, independently of the new or old value of the clock." msgstr "" "ضبط قيمة ساعة B عبر B() لن يكون له أي تأثير " "على الخيوط المحظورة في انتظار خدمة وقت نسبي بناءً على هذه الساعة، بما في ذلك " "دالة B()؛ ولا على انتهاء صلاحية المؤقتات النسبية بناءً على هذه " "الساعة. وبالتالي، ستنتهي صلاحية خدمات الوقت هذه عندما ينقضي الفاصل الزمني " "النسبي المطلوب، بغض النظر عن القيمة الجديدة أو القديمة للساعة." #. See http://bugzilla.kernel.org/show_bug.cgi?id=11972 #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "According to POSIX.1-2001, a process with \"appropriate privileges\" may set " "the B and B clocks using " "B(). On Linux, these clocks are not settable (i.e., no " "process has \"appropriate privileges\")." msgstr "" "وفقًا لـ POSIX.1-2001، يمكن لعملية ذات \"امتيازات مناسبة\" ضبط ساعتي " "B و B باستخدام " "B(). في لينكس، هذه الساعات غير قابلة للضبط (أي لا توجد عملية " "لها \"امتيازات مناسبة\")." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "C library/kernel differences" msgstr "الاختلافات بين مكتبة C والنواة" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "On some architectures, an implementation of B() is provided " "in the B(7)." msgstr "في بعض البنى، يتم توفير تطبيق لـ B() في B(7)." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "المعايير" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "POSIX.1-2024." msgstr "POSIX.1-2024." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "التاريخ" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "POSIX.1-1996, Linux 2.6." msgstr "POSIX.1-1996، لينكس 2.6." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "On POSIX systems on which these functions are available, the symbol " "B<_POSIX_TIMERS> is defined in Iunistd.hE> to a value greater than " "0. POSIX.1-2008 makes these functions mandatory." msgstr "" "في أنظمة POSIX التي تتوفر فيها هذه الدوال، يتم تعريف الرمز B<_POSIX_TIMERS> " "في Iunistd.hE> بقيمة أكبر من 0. يجعل POSIX.1-2008 هذه الدوال " "إلزامية." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The symbols B<_POSIX_MONOTONIC_CLOCK>, B<_POSIX_CPUTIME>, " "B<_POSIX_THREAD_CPUTIME> indicate that B, " "B, B are available. (See " "also B(3).)" msgstr "" "تشير الرموز B<_POSIX_MONOTONIC_CLOCK> و B<_POSIX_CPUTIME> و " "B<_POSIX_THREAD_CPUTIME> إلى أن B و " "B و B متوفرة. (انظر أيضًا " "B(3).)" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "POSIX.1-2024 made B mandatory." msgstr "جعل POSIX.1-2024 B إلزاميًا." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Historical note for SMP systems" msgstr "ملاحظة تاريخية لأنظمة SMP" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Before Linux added kernel support for B and " "B, glibc implemented these clocks on many platforms " "using timer registers from the CPUs (TSC on i386, AR.ITC on Itanium). These " "registers may differ between CPUs and as a consequence these clocks may " "return B if a process is migrated to another CPU." msgstr "" "قبل أن يضيف لينكس دعم النواة لـ B و " "B، نفذت glibc هذه الساعات على العديد من المنصات " "باستخدام مسجلات المؤقت من وحدات المعالجة المركزية (TSC على i386، AR.ITC على " "Itanium). قد تختلف هذه المسجلات بين وحدات المعالجة المركزية، وكنتيجة لذلك قد " "تعيد هذه الساعات B<نتائج زائفة> إذا تم ترحيل عملية إلى وحدة معالجة مركزية " "أخرى." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If the CPUs in an SMP system have different clock sources, then there is no " "way to maintain a correlation between the timer registers since each CPU " "will run at a slightly different frequency. If that is the case, then " "I will return B to signify this condition. " "The two clocks will then be useful only if it can be ensured that a process " "stays on a certain CPU." msgstr "" "إذا كانت وحدات المعالجة المركزية في نظام SMP تمتلك مصادر ساعة مختلفة، فلا " "توجد طريقة للحفاظ على ترابط بين مسجلات المؤقت لأن كل وحدة معالجة مركزية " "ستعمل بتردد مختلف قليلاً. إذا كان الأمر كذلك، فإن I " "سيعيد B للإشارة إلى هذه الحالة. عندها ستكون الساعتان مفيدتين فقط إذا " "أمكن ضمان بقاء عملية على وحدة معالجة مركزية معينة." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The processors in an SMP system do not start all at exactly the same time " "and therefore the timer registers are typically running at an offset. Some " "architectures include code that attempts to limit these offsets on bootup. " "However, the code cannot guarantee to accurately tune the offsets. glibc " "contains no provisions to deal with these offsets (unlike the Linux " "Kernel). Typically these offsets are small and therefore the effects may be " "negligible in most cases." msgstr "" "لا تبدأ المعالجات في نظام SMP جميعها في نفس الوقت تمامًا، وبالتالي تعمل " "مسجلات المؤقت عادةً بإزاحة. تتضمن بعض البنيات كودًا يحاول الحد من هذه الإزاحات " "عند الإقلاع. ومع ذلك، لا يمكن للكود ضمان ضبط الإزاحات بدقة. لا تحتوي glibc " "على أحكام للتعامل مع هذه الإزاحات (على عكس نواة لينكس). عادةً ما تكون هذه " "الإزاحات صغيرة، وبالتالي قد تكون التأثيرات ضئيلة في معظم الحالات." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Since glibc 2.4, the wrapper functions for the system calls described in " "this page avoid the abovementioned problems by employing the kernel " "implementation of B and " "B, on systems that provide such an implementation " "(i.e., Linux 2.6.12 and later)." msgstr "" "منذ glibc 2.4، تتجنب دوال التغليف لاستدعاءات النظام الموصوفة في هذه الصفحة " "المشاكل المذكورة أعلاه باستخدام تنفيذ النواة لـ B " "و B، على الأنظمة التي توفر مثل هذا التنفيذ (أي " "لينكس 2.6.12 والإصدارات الأحدث)." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "أمثلة" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The program below demonstrates the use of B() and " "B() with various clocks. This is an example of what we might " "see when running the program:" msgstr "" "يوضح البرنامج أدناه استخدام B() و B() مع ساعات " "مختلفة. هذا مثال لما قد نراه عند تشغيل البرنامج:" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "$B< ./clock_times x>;\n" "CLOCK_REALTIME : 1585985459.446 (18356 days + 7h 30m 59s)\n" " resolution: 0.000000001\n" "CLOCK_TAI : 1585985496.447 (18356 days + 7h 31m 36s)\n" " resolution: 0.000000001\n" "CLOCK_MONOTONIC: 52395.722 (14h 33m 15s)\n" " resolution: 0.000000001\n" "CLOCK_BOOTTIME : 72691.019 (20h 11m 31s)\n" " resolution: 0.000000001\n" msgstr "" "$B< ./clock_times x>;\n" "CLOCK_REALTIME : 1585985459.446 (18356 days + 7h 30m 59s)\n" " resolution: 0.000000001\n" "CLOCK_TAI : 1585985496.447 (18356 days + 7h 31m 36s)\n" " resolution: 0.000000001\n" "CLOCK_MONOTONIC: 52395.722 (14h 33m 15s)\n" " resolution: 0.000000001\n" "CLOCK_BOOTTIME : 72691.019 (20h 11m 31s)\n" " resolution: 0.000000001\n" #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Program source" msgstr "مصدر البرنامج" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "/* clock_times.c\n" "\\&\n" " Licensed under GNU General Public License v2 or later.\n" "*/\n" "#define _XOPEN_SOURCE 600\n" "#include Estdbool.hE\n" "#include Estdint.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/types.hE\n" "#include Etime.hE\n" "\\&\n" "#define SECS_IN_DAY (24 * 60 * 60)\n" "\\&\n" "static void\n" "displayClock(clockid_t clock, const char *name, bool showRes)\n" "{\n" " long days;\n" " struct timespec ts;\n" "\\&\n" " if (clock_gettime(clock, &ts) == -1) {\n" " perror(\"clock_gettime\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " printf(\"%-15s: %10jd.%03ld (\", name,\n" " (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);\n" "\\&\n" " days = ts.tv_sec / SECS_IN_DAY;\n" " if (days E 0)\n" " printf(\"%ld days + \", days);\n" "\\&\n" " printf(\"%2dh %2dm %2ds\",\n" " (int) (ts.tv_sec % SECS_IN_DAY) / 3600,\n" " (int) (ts.tv_sec % 3600) / 60,\n" " (int) ts.tv_sec % 60);\n" " printf(\")\\[rs]n\");\n" "\\&\n" " if (clock_getres(clock, &ts) == -1) {\n" " perror(\"clock_getres\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " if (showRes)\n" " printf(\" resolution: %10jd.%09ld\\[rs]n\",\n" " (intmax_t) ts.tv_sec, ts.tv_nsec);\n" "}\n" "\\&\n" "int\n" "main(int argc, char *[])\n" "{\n" " bool showRes = argc E 1;\n" "\\&\n" " displayClock(CLOCK_REALTIME, \"CLOCK_REALTIME\", showRes);\n" "#ifdef CLOCK_TAI\n" " displayClock(CLOCK_TAI, \"CLOCK_TAI\", showRes);\n" "#endif\n" " displayClock(CLOCK_MONOTONIC, \"CLOCK_MONOTONIC\", showRes);\n" "#ifdef CLOCK_BOOTTIME\n" " displayClock(CLOCK_BOOTTIME, \"CLOCK_BOOTTIME\", showRes);\n" "#endif\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" "/* clock_times.c\n" "\\&\n" " Licensed under GNU General Public License v2 or later.\n" "*/\n" "#define _XOPEN_SOURCE 600\n" "#include Estdbool.hE\n" "#include Estdint.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/types.hE\n" "#include Etime.hE\n" "\\&\n" "#define SECS_IN_DAY (24 * 60 * 60)\n" "\\&\n" "static void\n" "displayClock(clockid_t clock, const char *name, bool showRes)\n" "{\n" " long days;\n" " struct timespec ts;\n" "\\&\n" " if (clock_gettime(clock, &ts) == -1) {\n" " perror(\"clock_gettime\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " printf(\"%-15s: %10jd.%03ld (\", name,\n" " (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);\n" "\\&\n" " days = ts.tv_sec / SECS_IN_DAY;\n" " if (days E 0)\n" " printf(\"%ld days + \", days);\n" "\\&\n" " printf(\"%2dh %2dm %2ds\",\n" " (int) (ts.tv_sec % SECS_IN_DAY) / 3600,\n" " (int) (ts.tv_sec % 3600) / 60,\n" " (int) ts.tv_sec % 60);\n" " printf(\")\\[rs]n\");\n" "\\&\n" " if (clock_getres(clock, &ts) == -1) {\n" " perror(\"clock_getres\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " if (showRes)\n" " printf(\" resolution: %10jd.%09ld\\[rs]n\",\n" " (intmax_t) ts.tv_sec, ts.tv_nsec);\n" "}\n" "\\&\n" "int\n" "main(int argc, char *[])\n" "{\n" " bool showRes = argc E 1;\n" "\\&\n" " displayClock(CLOCK_REALTIME, \"CLOCK_REALTIME\", showRes);\n" "#ifdef CLOCK_TAI\n" " displayClock(CLOCK_TAI, \"CLOCK_TAI\", showRes);\n" "#endif\n" " displayClock(CLOCK_MONOTONIC, \"CLOCK_MONOTONIC\", showRes);\n" "#ifdef CLOCK_BOOTTIME\n" " displayClock(CLOCK_BOOTTIME, \"CLOCK_BOOTTIME\", showRes);\n" "#endif\n" " exit(EXIT_SUCCESS);\n" "}\n" #. SRC END #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "انظر أيضًا" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B(1), B(2), B(2), B