[DEV] update to the new time interface
This commit is contained in:
parent
fde82393d2
commit
a09f071a11
@ -8,6 +8,7 @@
|
|||||||
#include <appl/Highlight.hpp>
|
#include <appl/Highlight.hpp>
|
||||||
#include <exml/exml.hpp>
|
#include <exml/exml.hpp>
|
||||||
#include <ewol/ewol.hpp>
|
#include <ewol/ewol.hpp>
|
||||||
|
#include <echrono/Steady.hpp>
|
||||||
#include <gale/resource/Manager.hpp>
|
#include <gale/resource/Manager.hpp>
|
||||||
|
|
||||||
// first pass
|
// first pass
|
||||||
@ -205,10 +206,10 @@ void appl::Highlight::parse(int64_t _start,
|
|||||||
int64_t elementStart = _start;
|
int64_t elementStart = _start;
|
||||||
int64_t elementStop = _stop;
|
int64_t elementStop = _stop;
|
||||||
appl::HighlightInfo resultat;
|
appl::HighlightInfo resultat;
|
||||||
int64_t startTime = ewol::getTime();
|
echrono::Steady startTime = echrono::Steady::now();
|
||||||
while (elementStart <= elementStop) {
|
while (elementStart <= elementStop) {
|
||||||
//HL_DEBUG("Parse element in the buffer pos=" << elementStart);
|
//HL_DEBUG("Parse element in the buffer pos=" << elementStart);
|
||||||
int64_t currentTime = ewol::getTime();
|
echrono::Steady currentTime = echrono::Steady::now();;
|
||||||
//try to fond the HL in ALL of we have
|
//try to fond the HL in ALL of we have
|
||||||
for (int64_t jjj=0; jjj<(int64_t)m_listHighlightPass1.size(); jjj++){
|
for (int64_t jjj=0; jjj<(int64_t)m_listHighlightPass1.size(); jjj++){
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
@ -222,9 +223,9 @@ void appl::Highlight::parse(int64_t _start,
|
|||||||
// Stop the search to the end (to get the end of the pattern)
|
// Stop the search to the end (to get the end of the pattern)
|
||||||
ret = m_listHighlightPass1[jjj].find(elementStart, _buffer.size(), resultat, _buffer);
|
ret = m_listHighlightPass1[jjj].find(elementStart, _buffer.size(), resultat, _buffer);
|
||||||
if (ret == true) {
|
if (ret == true) {
|
||||||
int64_t currentTimeEnd = ewol::getTime();
|
echrono::Steady currentTimeEnd = echrono::Steady::now();;
|
||||||
int64_t deltaTime = currentTimeEnd - currentTime;
|
echrono::Duration deltaTime = currentTimeEnd - currentTime;
|
||||||
HL_DEBUG("Find Pattern in the Buffer : time=" << (float)deltaTime/1000.0f << " ms (" << resultat.start << "," << resultat.stop << ") startPos=" << elementStart << " for=" << m_listHighlightPass1[jjj].getPaternString().first << " " << m_listHighlightPass1[jjj].getPaternString().second);
|
HL_DEBUG("Find Pattern in the Buffer : time=" << deltaTime << " (" << resultat.start << "," << resultat.stop << ") startPos=" << elementStart << " for=" << m_listHighlightPass1[jjj].getPaternString().first << " " << m_listHighlightPass1[jjj].getPaternString().second);
|
||||||
// remove element in the current List where the current Element have a end inside the next...
|
// remove element in the current List where the current Element have a end inside the next...
|
||||||
int64_t kkk=_addingPos;
|
int64_t kkk=_addingPos;
|
||||||
while(kkk < (int64_t)_metaData.size() ) {
|
while(kkk < (int64_t)_metaData.size() ) {
|
||||||
@ -259,9 +260,9 @@ void appl::Highlight::parse(int64_t _start,
|
|||||||
// Go to the next element (and search again ...).
|
// Go to the next element (and search again ...).
|
||||||
elementStart++;
|
elementStart++;
|
||||||
}
|
}
|
||||||
int64_t stopTime = ewol::getTime();
|
echrono::Steady stopTime = echrono::Steady::now();
|
||||||
int64_t deltaTimeGlobal = stopTime - startTime;
|
echrono::Duration deltaTimeGlobal = stopTime - startTime;
|
||||||
APPL_DEBUG("parse in time=" << (float)deltaTimeGlobal/1000.0f << " ms ");
|
APPL_DEBUG("parse in time=" << deltaTimeGlobal);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ class MainApplication : public ewol::context::Application {
|
|||||||
ememory::SharedPtr<appl::textPluginManager> m_pluginManager;
|
ememory::SharedPtr<appl::textPluginManager> m_pluginManager;
|
||||||
public:
|
public:
|
||||||
virtual void onCreate(ewol::Context& _context) override {
|
virtual void onCreate(ewol::Context& _context) override {
|
||||||
APPL_INFO(" == > CREATE ... " << PROJECT_NAME << " v" << APPL_VERSION << " (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ") (BEGIN)");
|
APPL_INFO(" == > CREATE ... " << PROJECT_NAME << " v" << APPL_VERSION << " (START) [" << gale::getBoardType() << "] (" << gale::getCompilationMode() << ") (BEGIN)");
|
||||||
for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) {
|
for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) {
|
||||||
std::string tmpppp = _context.getCmd().get(iii);
|
std::string tmpppp = _context.getCmd().get(iii);
|
||||||
if ( tmpppp == "-h"
|
if ( tmpppp == "-h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user