Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
58d40a74
Kaydet (Commit)
58d40a74
authored
Ock 13, 1997
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Renamed.
üst
5b456645
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
49 deletions
+45
-49
timingmodule.c
Modules/timingmodule.c
+45
-49
No files found.
Modules/timingmodule.c
Dosyayı görüntüle @
58d40a74
...
@@ -2,90 +2,86 @@
...
@@ -2,90 +2,86 @@
* Author: George V. Neville-Neil
* Author: George V. Neville-Neil
*/
*/
#include "allobjects.h"
#include "Python.h"
#include "import.h"
#include "modsupport.h"
#include "ceval.h"
/* Our stuff... */
/* Our stuff... */
#include "timing.h"
#include "timing.h"
static
o
bject
*
static
PyO
bject
*
start_timing
(
self
,
args
)
start_timing
(
self
,
args
)
o
bject
*
self
;
PyO
bject
*
self
;
o
bject
*
args
;
PyO
bject
*
args
;
{
{
if
(
!
getargs
(
args
,
""
))
if
(
!
PyArg_Parse
(
args
,
""
))
return
NULL
;
return
NULL
;
INCREF
(
None
);
Py_INCREF
(
Py_
None
);
BEGINTIMING
;
BEGINTIMING
;
return
None
;
return
Py_
None
;
}
}
static
o
bject
*
static
PyO
bject
*
finish_timing
(
self
,
args
)
finish_timing
(
self
,
args
)
o
bject
*
self
;
PyO
bject
*
self
;
o
bject
*
args
;
PyO
bject
*
args
;
{
{
if
(
!
getargs
(
args
,
""
))
if
(
!
PyArg_Parse
(
args
,
""
))
return
NULL
;
return
NULL
;
ENDTIMING
ENDTIMING
INCREF
(
None
);
Py_INCREF
(
Py_
None
);
return
None
;
return
Py_
None
;
}
}
static
o
bject
*
static
PyO
bject
*
seconds
(
self
,
args
)
seconds
(
self
,
args
)
o
bject
*
self
;
PyO
bject
*
self
;
o
bject
*
args
;
PyO
bject
*
args
;
{
{
if
(
!
getargs
(
args
,
""
))
if
(
!
PyArg_Parse
(
args
,
""
))
return
NULL
;
return
NULL
;
return
newintobject
(
TIMINGS
);
return
PyInt_FromLong
(
TIMINGS
);
}
}
static
o
bject
*
static
PyO
bject
*
milli
(
self
,
args
)
milli
(
self
,
args
)
o
bject
*
self
;
PyO
bject
*
self
;
o
bject
*
args
;
PyO
bject
*
args
;
{
{
if
(
!
getargs
(
args
,
""
))
if
(
!
PyArg_Parse
(
args
,
""
))
return
NULL
;
return
NULL
;
return
newintobject
(
TIMINGMS
);
return
PyInt_FromLong
(
TIMINGMS
);
}
}
static
o
bject
*
static
PyO
bject
*
micro
(
self
,
args
)
micro
(
self
,
args
)
o
bject
*
self
;
PyO
bject
*
self
;
o
bject
*
args
;
PyO
bject
*
args
;
{
{
if
(
!
getargs
(
args
,
""
))
if
(
!
PyArg_Parse
(
args
,
""
))
return
NULL
;
return
NULL
;
return
newintobject
(
TIMINGUS
);
return
PyInt_FromLong
(
TIMINGUS
);
}
}
static
struct
methodlist
timing_methods
[]
=
{
static
PyMethodDef
timing_methods
[]
=
{
{
"start"
,
start_timing
},
{
"start"
,
start_timing
},
{
"finish"
,
finish_timing
},
{
"finish"
,
finish_timing
},
{
"seconds"
,
seconds
},
{
"seconds"
,
seconds
},
{
"milli"
,
milli
},
{
"milli"
,
milli
},
{
"micro"
,
micro
},
{
"micro"
,
micro
},
{
NULL
,
NULL
}
{
NULL
,
NULL
}
};
};
void
inittiming
()
void
inittiming
()
{
{
object
*
m
;
(
void
)
Py_InitModule
(
"timing"
,
timing_methods
);
if
(
PyErr_Occurred
())
m
=
initmodule
(
"timing"
,
timing_methods
);
Py_FatalError
(
"can't initialize module timing"
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment